PERFORCE change 112488 for review
Kip Macy
kmacy at FreeBSD.org
Thu Jan 4 11:41:49 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=112488
Change 112488 by kmacy at 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);
More information about the p4-projects
mailing list