summaryrefslogtreecommitdiff
path: root/sys/dev/ic/xl.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2015-09-11 13:02:29 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2015-09-11 13:02:29 +0000
commit60446fe20a75a96e4e90d49e026768a4a5de327e (patch)
tree4df36879019283b812826de0f68df84379613b0f /sys/dev/ic/xl.c
parent39d4e265d62cc7fb7ea6c2dfa113f7e47cb3a730 (diff)
Make room for media types of the future. Extend the ifmedia word to 64 bits.
This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and grows struct ifmediareq. Old ifconfig and dhclient binaries can still assign addresses, however the 'media' subcommand stops working. Recompiling ifconfig and dhclient with new headers before a reboot should not be necessary unless in very special circumstances where non-default media settings must be used to get link and console access is not available. There may be some MD fallout but that will be cleared up later. ok deraadt miod with help and suggestions from several sharks attending l2k15
Diffstat (limited to 'sys/dev/ic/xl.c')
-rw-r--r--sys/dev/ic/xl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index a0af31e0ba3..c36fcd6717c 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.125 2015/06/24 09:40:54 mpi Exp $ */
+/* $OpenBSD: xl.c,v 1.126 2015/09/11 13:02:28 stsp Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -166,7 +166,7 @@ int xl_mii_readreg(struct xl_softc *, struct xl_mii_frame *);
int xl_mii_writereg(struct xl_softc *, struct xl_mii_frame *);
void xl_setcfg(struct xl_softc *);
-void xl_setmode(struct xl_softc *, int);
+void xl_setmode(struct xl_softc *, uint64_t);
void xl_iff(struct xl_softc *);
void xl_iff_90x(struct xl_softc *);
void xl_iff_905b(struct xl_softc *);
@@ -676,7 +676,7 @@ xl_setcfg(struct xl_softc *sc)
}
void
-xl_setmode(struct xl_softc *sc, int media)
+xl_setmode(struct xl_softc *sc, uint64_t media)
{
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
u_int32_t icfg;
@@ -2349,7 +2349,8 @@ xl_attach(struct xl_softc *sc)
u_int8_t enaddr[ETHER_ADDR_LEN];
u_int16_t xcvr[2];
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int i, media = IFM_ETHER|IFM_100_TX|IFM_FDX;
+ int i;
+ uint64_t media = IFM_ETHER|IFM_100_TX|IFM_FDX;
struct ifmedia *ifm;
i = splnet();