Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2008 21:11:33 GMT
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 139294 for review
Message-ID:  <200804032111.m33LBX7N029757@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=139294

Change 139294 by thompsa@thompsa_burger on 2008/04/03 21:11:27

	We may panic if stopping the callout in wpi_newstate as the mutex _must_
	be held. Go back to bailing from the callout if we arent in RUN anymore
	but hack it for vap. Kinda icky.

Affected files ...

.. //depot/projects/vap/sys/dev/wpi/if_wpi.c#14 edit

Differences ...

==== //depot/projects/vap/sys/dev/wpi/if_wpi.c#14 (text+ko) ====

@@ -1263,8 +1263,6 @@
 		ieee80211_state_name[vap->iv_state],
 		ieee80211_state_name[nstate], sc->flags));
 
-	callout_stop(&sc->calib_to);
-
 	if (nstate == IEEE80211_S_AUTH) {
 		/* Delay the auth transition until we can update the firmware */
 		error = wpi_queue_cmd(sc, WPI_AUTH, arg, WPI_QUEUE_NORMAL);
@@ -3161,8 +3159,13 @@
 wpi_calib_timeout(void *arg)
 {
 	struct wpi_softc *sc = arg;
+	struct ieee80211com *ic = &sc->sc_ic;
+	struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
 	int temp;
 
+	if (vap->iv_state != IEEE80211_S_RUN)
+		return;
+
 	/* update sensor data */
 	temp = (int)WPI_READ(sc, WPI_TEMPERATURE);
 	DPRINTFN(WPI_DEBUG_TEMP,("Temp in calibration is: %d\n", temp));



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