summaryrefslogtreecommitdiff
path: root/sys/dev/ic/xl.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-11-09 17:39:08 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-11-09 17:39:08 +0000
commit06e3579118de0e275610c2060770fff7febe25c6 (patch)
treebc7cad806fbb8a65da9e95e2ca7c2488b6d8f9ef /sys/dev/ic/xl.c
parentaa59396b6c187bd76cb72e4f97fea63f58b025f0 (diff)
new timeouts
Diffstat (limited to 'sys/dev/ic/xl.c')
-rw-r--r--sys/dev/ic/xl.c12
1 files changed, 7 insertions, 5 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);