summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-06-30 01:02:34 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-06-30 01:02:34 +0000
commitf2ab17d342b804a7a4a23acc7cd03ab41ed5a96b (patch)
tree06dce082f61f99b558556c832b92028a6f8adaac /sys
parent57c515ddca6c0287de2b1aa5b2341228b9860f07 (diff)
Convert to new timeouts.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mii/mii_physubr.c7
-rw-r--r--sys/dev/mii/miivar.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c
index 3aecb15f884..fdd73799975 100644
--- a/sys/dev/mii/mii_physubr.c
+++ b/sys/dev/mii/mii_physubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii_physubr.c,v 1.3 1999/12/07 22:01:31 jason Exp $ */
+/* $OpenBSD: mii_physubr.c,v 1.4 2000/06/30 01:02:33 art Exp $ */
/* $NetBSD: mii_physubr.c,v 1.2.6.1 1999/04/23 15:40:26 perry Exp $ */
/*-
@@ -136,7 +136,8 @@ mii_phy_auto(mii, waitfor)
*/
if ((mii->mii_flags & MIIF_DOINGAUTO) == 0) {
mii->mii_flags |= MIIF_DOINGAUTO;
- timeout(mii_phy_auto_timeout, mii, hz >> 1);
+ timeout_set(&mii->mii_phy_timo, mii_phy_auto_timeout, mii);
+ timeout_add(&mii->mii_phy_timo, hz / 2);
}
return (EJUSTRETURN);
}
@@ -186,7 +187,7 @@ mii_phy_down(sc)
{
if (sc->mii_flags & MIIF_DOINGAUTO) {
sc->mii_flags &= ~MIIF_DOINGAUTO;
- untimeout(mii_phy_auto_timeout, sc);
+ timeout_del(&sc->mii_phy_timo);
}
}
diff --git a/sys/dev/mii/miivar.h b/sys/dev/mii/miivar.h
index eeb5872286c..073670da42e 100644
--- a/sys/dev/mii/miivar.h
+++ b/sys/dev/mii/miivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: miivar.h,v 1.5 2000/04/24 21:13:33 niklas Exp $ */
+/* $OpenBSD: miivar.h,v 1.6 2000/06/30 01:02:33 art Exp $ */
/* $NetBSD: miivar.h,v 1.7.6.1 1999/04/23 15:40:35 perry Exp $ */
/*-
@@ -42,6 +42,7 @@
#define _DEV_MII_MIIVAR_H_
#include <sys/queue.h>
+#include <sys/timeout.h>
/*
* Media Independent Interface autoconfiguration defintions.
@@ -125,6 +126,7 @@ struct mii_softc {
int mii_capabilities; /* capabilities from BMSR */
int mii_ticks; /* MII_TICK counter */
int mii_active; /* last active media */
+ struct timeout mii_phy_timo; /* timeout handle */
};
typedef struct mii_softc mii_softc_t;