Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2007 19:41:48 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 112488 for review
Message-ID:  <200701041941.l04Jfmm6002566@repoman.freebsd.org>

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

Change 112488 by kmacy@kmacy_serendipity:sam_wifi on 2007/01/04 19:41:18

	fix LOR by not acquiring the sc lock before wi_stop
	acquire the sc lock in wi_stop after calling ieee80211_newstate

Affected files ...

.. //depot/projects/wifi/sys/dev/wi/if_wi.c#27 edit

Differences ...

==== //depot/projects/wifi/sys/dev/wi/if_wi.c#27 (text+ko) ====

@@ -672,15 +672,15 @@
 	int i;
 	int error = 0, wasenabled;
 
-	WI_LOCK(sc);
+
 
-	if (sc->wi_gone) {
-		WI_UNLOCK(sc);
+	if (sc->wi_gone) 
 		return;
-	}
 
 	if ((wasenabled = sc->sc_enabled))
 		wi_stop(ifp, 1);
+
+	WI_LOCK(sc);
 	wi_reset(ifp);
 
 	/* common 802.11 configuration */
@@ -874,11 +874,10 @@
 	struct wi_softc *sc = ifp->if_softc;
 	struct ieee80211com *ic = &sc->sc_ic;
 
-	WI_LOCK(sc);
+	ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
 
 	DELAY(100000);
-
-	ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
+	WI_LOCK(sc);
 	if (sc->sc_enabled && !sc->wi_gone) {
 		CSR_WRITE_2(sc, WI_INT_EN, 0);
 		wi_cmd(sc, WI_CMD_DISABLE | sc->sc_portnum, 0, 0, 0);



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