summaryrefslogtreecommitdiff
path: root/sys/dev/ofw/ofnet.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-08-08 21:49:17 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-08-08 21:49:17 +0000
commit1297bdd5a1b4b45eba1c77970f67a00ac7762d48 (patch)
tree613579ce212b3bede5138846193c94c6603e4aa4 /sys/dev/ofw/ofnet.c
parentf3455e263ff19d86f0a6c8faae0fc6ac7e00e23d (diff)
New timeouts, drahn@ sez go ahead.
Diffstat (limited to 'sys/dev/ofw/ofnet.c')
-rw-r--r--sys/dev/ofw/ofnet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c
index 0d7e9ae6e1a..d252885e603 100644
--- a/sys/dev/ofw/ofnet.c
+++ b/sys/dev/ofw/ofnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofnet.c,v 1.5 2001/06/25 04:47:33 fgsch Exp $ */
+/* $OpenBSD: ofnet.c,v 1.6 2001/08/08 21:49:16 miod Exp $ */
/* $NetBSD: ofnet.c,v 1.4 1996/10/16 19:33:21 ws Exp $ */
/*
@@ -69,6 +69,7 @@ struct ofn_softc {
int sc_phandle;
int sc_ihandle;
struct arpcom sc_arpcom;
+ struct timeout sc_tmo;
void *dmabuf;
};
@@ -162,6 +163,8 @@ printf("\nethernet dev: path %s\n", path);
ifp->if_watchdog = ofnwatchdog;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
+ timeout_set(&of->sc_tmo, ofntimer, of);
+
if_attach(ifp);
ether_ifattach(ifp);
@@ -246,7 +249,7 @@ ofntimer(of)
struct ofn_softc *of;
{
ofnread(of);
- timeout(ofntimer, of, 1);
+ timeout_add(&of->sc_tmo, 1);
}
static void
@@ -269,7 +272,7 @@ static void
ofnstop(of)
struct ofn_softc *of;
{
- untimeout(ofntimer, of);
+ timeout_del(&of->sc_tmo);
of->sc_arpcom.ac_if.if_flags &= ~IFF_RUNNING;
}