diff options
author | avos <avos@FreeBSD.org> | 2016-10-01 03:24:53 +0000 |
---|---|---|
committer | avos <avos@FreeBSD.org> | 2016-10-01 03:24:53 +0000 |
commit | 5513c4602acb9d1e5d22c58e867ae3714c2ee127 (patch) | |
tree | 168b79dae68e6af61538acb51c56e3b2dfb8a429 | |
parent | 8ee8b335f1b645c42d8eaf7a0236e1927611acac (diff) | |
download | FreeBSD-src-5513c4602acb9d1e5d22c58e867ae3714c2ee127.zip FreeBSD-src-5513c4602acb9d1e5d22c58e867ae3714c2ee127.tar.gz |
MFC r306320:
rsu: do not restart calibration task when going out of RUN state.
Clear 'sc_calibrating' flag and stop calibration task when interface
is not associated; this fixes possible panic after detach.
Reported and tested by: hselasky
Reviewed by: adrian
-rw-r--r-- | sys/dev/usb/wlan/if_rsu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index c08b4af..4ee9dec 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -1270,9 +1270,12 @@ rsu_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) default: break; } - sc->sc_calibrating = 1; - /* Start periodic calibration. */ - taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, hz); + if (startcal != 0) { + sc->sc_calibrating = 1; + /* Start periodic calibration. */ + taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_task, + hz); + } RSU_UNLOCK(sc); IEEE80211_LOCK(ic); return (uvp->newstate(vap, nstate, arg)); |