Date: Sat, 1 Oct 2016 03:24:53 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306549 - stable/11/sys/dev/usb/wlan Message-ID: <201610010324.u913OrbQ081223@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sat Oct 1 03:24:53 2016 New Revision: 306549 URL: https://svnweb.freebsd.org/changeset/base/306549 Log: 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 Modified: stable/11/sys/dev/usb/wlan/if_rsu.c Modified: stable/11/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_rsu.c Sat Oct 1 01:30:34 2016 (r306548) +++ stable/11/sys/dev/usb/wlan/if_rsu.c Sat Oct 1 03:24:53 2016 (r306549) @@ -1270,9 +1270,12 @@ rsu_newstate(struct ieee80211vap *vap, e 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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610010324.u913OrbQ081223>