svn commit: r306320 - head/sys/dev/usb/wlan

Andriy Voskoboinyk avos at FreeBSD.org
Sun Sep 25 19:13:08 UTC 2016


Author: avos
Date: Sun Sep 25 19:13:07 2016
New Revision: 306320
URL: https://svnweb.freebsd.org/changeset/base/306320

Log:
  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
  MFC after:	6 days

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rsu.c	Sun Sep 25 18:39:24 2016	(r306319)
+++ head/sys/dev/usb/wlan/if_rsu.c	Sun Sep 25 19:13:07 2016	(r306320)
@@ -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));


More information about the svn-src-all mailing list