From e6be242b0a870677c04cc54f621399bb2b4bb813 Mon Sep 17 00:00:00 2001 From: Weongyo Jeong Date: Fri, 19 Sep 2008 05:10:33 +0000 Subject: [PATCH] clear pending callbacks when the driver try to change the state Pointed by: sam --- sys/dev/usb/if_zyd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index cc6c607e16f1..58cdf2f1a661 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -763,7 +763,9 @@ zyd_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) struct ieee80211com *ic = vap->iv_ic; struct zyd_softc *sc = ic->ic_ifp->if_softc; + usb_rem_task(sc->sc_udev, &sc->sc_scantask); usb_rem_task(sc->sc_udev, &sc->sc_task); + callout_stop(&sc->sc_watchdog_ch); /* do it in a process context */ sc->sc_state = nstate;