summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-12-05 18:54:21 +0000
committerume <ume@FreeBSD.org>2006-12-05 18:54:21 +0000
commit4146b6c5f42f88f3733f824bb399c486286a9e90 (patch)
treed98bb7c535a6a4a869c8b55de6fcfb38d31ac296 /sys/net
parent43eb9a52dd084d1f53504c61441e712c9416b77f (diff)
downloadFreeBSD-src-4146b6c5f42f88f3733f824bb399c486286a9e90.zip
FreeBSD-src-4146b6c5f42f88f3733f824bb399c486286a9e90.tar.gz
Use callout mechanism instead of timeout()/untimeout().
MFC after: 1 week
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ppp.c1
-rw-r--r--sys/net/if_pppvar.h2
-rw-r--r--sys/net/ppp_tty.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 394aa8d..956f9b6 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -220,6 +220,7 @@ ppp_clone_create(struct if_clone *ifc, int unit, caddr_t params)
return (ENOSPC);
}
+ callout_init(&sc->sc_timo_ch, 0);
ifp->if_softc = sc;
if_initname(ifp, ifc->ifc_name, unit);
ifp->if_mtu = PPP_MTU;
diff --git a/sys/net/if_pppvar.h b/sys/net/if_pppvar.h
index 75d99a8..77e1ade 100644
--- a/sys/net/if_pppvar.h
+++ b/sys/net/if_pppvar.h
@@ -57,7 +57,7 @@
struct ppp_softc {
struct ifnet *sc_ifp; /* network-visible interface */
/*hi*/ u_int sc_flags; /* control/status bits; see if_ppp.h */
- struct callout_handle sc_ch; /* Used for scheduling timeouts */
+ struct callout sc_timo_ch; /* Used for scheduling timeouts */
void *sc_devp; /* pointer to device-dep structure */
void (*sc_start)(struct ppp_softc *); /* start output proc */
void (*sc_ctlp)(struct ppp_softc *); /* rcvd control pkt */
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index 6e79985..ae37bd7 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -277,7 +277,7 @@ pppasyncrelinq(sc)
sc->sc_m = NULL;
}
if (sc->sc_flags & SC_TIMEOUT) {
- untimeout(ppp_timeout, (void *) sc, sc->sc_ch);
+ callout_stop(&sc->sc_timo_ch);
sc->sc_flags &= ~SC_TIMEOUT;
}
splx(s);
@@ -698,7 +698,7 @@ pppasyncstart(sc)
* drained the t_outq.
*/
if (!idle && (sc->sc_flags & SC_TIMEOUT) == 0) {
- sc->sc_ch = timeout(ppp_timeout, (void *) sc, 1);
+ callout_reset(&sc->sc_timo_ch, 1, ppp_timeout, sc);
sc->sc_flags |= SC_TIMEOUT;
}
OpenPOWER on IntegriCloud