diff options
author | dg <dg@FreeBSD.org> | 1995-12-05 02:01:59 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-12-05 02:01:59 +0000 |
commit | 8156a5707a8830d1ce5658e103e6780f22cfc8dd (patch) | |
tree | 85cbbd7c1e0b938f939f958fcf5fd93d4c5c5406 /sys/dev/lnc | |
parent | fd5819ba7c85b8236d4b1f4cc3340e673229a93a (diff) | |
download | FreeBSD-src-8156a5707a8830d1ce5658e103e6780f22cfc8dd.zip FreeBSD-src-8156a5707a8830d1ce5658e103e6780f22cfc8dd.tar.gz |
all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused.
Change the parameter passed to if_watchdog to be a ifnet * rather than
a unit number. All of this is an attempt to move toward not needing an
array of softc pointers (which is usually static in size) to point to
the driver softc.
if_ed.c:
Changed some of the argument passing to some functions to make a little
more sense.
if_ep.c, if_vx.c:
Killed completely bogus use of if_timer. It was being set in such a way
that the interface was being reset once per second (blech!).
Diffstat (limited to 'sys/dev/lnc')
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index a04c39e..ffc57a7 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -136,7 +136,7 @@ static int pcnet_probe(int); static void lnc_init(int); static void lnc_start(struct ifnet *); static int lnc_ioctl(struct ifnet *, int, caddr_t); -static void lnc_watchdog(int); +static void lnc_watchdog(struct ifnet *); static int lnc_probe(struct isa_device *); static int lnc_attach(struct isa_device *); #ifdef DEBUG @@ -1088,11 +1088,9 @@ lnc_attach(struct isa_device * isa_dev) sc->arpcom.ac_if.if_mtu = ETHERMTU; sc->arpcom.ac_if.if_flags = IFF_BROADCAST | IFF_SIMPLEX; sc->arpcom.ac_if.if_timer = 0; - sc->arpcom.ac_if.if_init = lnc_init; sc->arpcom.ac_if.if_output = ether_output; sc->arpcom.ac_if.if_start = lnc_start; sc->arpcom.ac_if.if_ioctl = lnc_ioctl; - sc->arpcom.ac_if.if_reset = lnc_reset; sc->arpcom.ac_if.if_watchdog = lnc_watchdog; sc->arpcom.ac_if.if_type = IFT_ETHER; sc->arpcom.ac_if.if_addrlen = ETHER_ADDR_LEN; @@ -1668,11 +1666,11 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data) } static void -lnc_watchdog(int unit) +lnc_watchdog(struct ifnet *ifp) { - log(LOG_ERR, "lnc%d: Device timeout -- Resetting\n", unit); - ++lnc_softc[unit].arpcom.ac_if.if_oerrors; - lnc_reset(unit); + log(LOG_ERR, "lnc%d: Device timeout -- Resetting\n", ifp->if_unit); + ifp->if_oerrors++; + lnc_reset(ifp->if_unit); } #ifdef DEBUG |