Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2016 19:13:07 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306320 - head/sys/dev/usb/wlan
Message-ID:  <201609251913.u8PJD7QA064893@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609251913.u8PJD7QA064893>