summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/xl.c12
-rw-r--r--sys/dev/ic/xlreg.h3
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index e8c5d625342..d88cdb3966d 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.17 2000/10/19 16:33:51 jason Exp $ */
+/* $OpenBSD: xl.c,v 1.18 2000/11/09 17:39:06 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1552,7 +1552,7 @@ void xl_stats_update(xsc)
XL_SEL_WIN(7);
if (!sc->xl_stats_no_timeout)
- timeout(xl_stats_update, sc, hz);
+ timeout_add(&sc->xl_stsup_tmo, hz);
return;
}
@@ -2075,7 +2075,7 @@ void xl_init(xsc)
(void)splx(s);
- timeout(xl_stats_update, sc, hz);
+ timeout_add(&sc->xl_stsup_tmo, hz);
return;
}
@@ -2383,7 +2383,7 @@ void xl_stop(sc)
(*sc->intr_ack)(sc);
/* Stop the stats updater. */
- untimeout(xl_stats_update, sc);
+ timeout_del(&sc->xl_stsup_tmo);
xl_freetxrx(sc);
@@ -2468,6 +2468,8 @@ xl_attach(sc)
else
sc->xl_type = XL_TYPE_90X;
+ timeout_set(&sc->xl_stsup_tmo, xl_stats_update, sc);
+
ifp->if_softc = sc;
ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -2635,7 +2637,7 @@ xl_detach(sc)
struct ifnet *ifp = &sc->arpcom.ac_if;
/* Unhook our tick handler. */
- untimeout(xl_stats_update, sc);
+ timeout_del(&sc->xl_stsup_tmo);
xl_freetxrx(sc);
diff --git a/sys/dev/ic/xlreg.h b/sys/dev/ic/xlreg.h
index 7d0f7c3aaa0..3749426f22e 100644
--- a/sys/dev/ic/xlreg.h
+++ b/sys/dev/ic/xlreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlreg.h,v 1.7 2000/10/19 16:33:52 jason Exp $ */
+/* $OpenBSD: xlreg.h,v 1.8 2000/11/09 17:39:07 mickey Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -562,6 +562,7 @@ struct xl_mii_frame {
struct xl_softc {
struct device sc_dev; /* generic device structure */
void * xl_intrhand; /* interrupt handler cookie */
+ struct timeout xl_stsup_tmo; /* stats update timeout */
struct arpcom arpcom; /* interface info */
struct ifmedia ifmedia; /* media info */
mii_data_t sc_mii; /* mii bus */