summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/fxp.c14
-rw-r--r--sys/dev/ic/fxpvar.h3
2 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 07e920e523c..f4942b73e0e 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.6 2000/06/03 02:55:04 jason Exp $ */
+/* $OpenBSD: fxp.c,v 1.7 2000/07/20 16:22:26 ho Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -46,6 +46,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/syslog.h>
+#include <sys/timeout.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -422,6 +423,11 @@ fxp_attach_common(sc, enaddr, intrstr)
*/
powerhook_establish(fxp_power, sc);
+ /*
+ * Initialize timeout for statistics update.
+ */
+ timeout_set(&sc->stats_update_to, fxp_stats_update, sc);
+
return (0);
fail:
@@ -935,7 +941,7 @@ fxp_stats_update(arg)
/*
* Schedule another timeout one second from now.
*/
- timeout(fxp_stats_update, sc, hz);
+ timeout_add(&sc->stats_update_to, hz);
}
/*
@@ -961,7 +967,7 @@ fxp_stop(sc, drain)
/*
* Cancel stats updater.
*/
- untimeout(fxp_stats_update, sc);
+ timeout_del(&sc->stats_update_to);
/*
* Issue software reset
@@ -1177,7 +1183,7 @@ fxp_init(xsc)
/*
* Start stats updater.
*/
- timeout(fxp_stats_update, sc, hz);
+ timeout_add(&sc->stats_update_to, hz);
}
/*
diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h
index 92e075daaec..ddeefcb8515 100644
--- a/sys/dev/ic/fxpvar.h
+++ b/sys/dev/ic/fxpvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxpvar.h,v 1.2 2000/04/26 19:12:08 chris Exp $ */
+/* $OpenBSD: fxpvar.h,v 1.3 2000/07/20 16:22:26 ho Exp $ */
/* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */
/*
@@ -55,6 +55,7 @@ struct fxp_softc {
int need_mcsetup; /* multicast filter needs programming */
struct fxp_cb_tx *cbl_last; /* last active TxCB in list */
struct fxp_stats *fxp_stats; /* Pointer to interface stats */
+ struct timeout stats_update_to; /* Pointer to timeout structure */
int rx_idle_secs; /* # of seconds RX has been idle */
struct fxp_cb_tx *cbl_base; /* base of TxCB list */
struct fxp_cb_mcs *mcsp; /* Pointer to mcast setup descriptor */