diff options
author | sam <sam@FreeBSD.org> | 2008-04-25 19:13:38 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-04-25 19:13:38 +0000 |
commit | 9f3b3ed8241ecf4aebd7e67d040cbb71ff91e95e (patch) | |
tree | 6bbb802858c1b6ce389f7f09a703fb3b28641255 /sys/dev/usb | |
parent | c8b0048ac3ed9aff3bbafe792b35cbb126341cd0 (diff) | |
download | FreeBSD-src-9f3b3ed8241ecf4aebd7e67d040cbb71ff91e95e.zip FreeBSD-src-9f3b3ed8241ecf4aebd7e67d040cbb71ff91e95e.tar.gz |
remove scan task on state change so it doesn't unexpectedly fire
Noticed by: Paul B. Mahol
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_rum.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index ec46c84..b32ac38 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -816,13 +816,14 @@ rum_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) struct ieee80211com *ic = vap->iv_ic; struct rum_softc *sc = ic->ic_ifp->if_softc; + usb_rem_task(sc->sc_udev, &sc->sc_task); + usb_rem_task(sc->sc_udev, &sc->sc_scantask); callout_stop(&rvp->amrr_ch); /* do it in a process context */ sc->sc_state = nstate; sc->sc_arg = arg; - usb_rem_task(sc->sc_udev, &sc->sc_task); if (nstate == IEEE80211_S_INIT) { rvp->newstate(vap, nstate, arg); return 0; |