PERFORCE change 112490 for review

Kip Macy kmacy at FreeBSD.org
Thu Jan 4 12:23:43 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=112490

Change 112490 by kmacy at kmacy_serendipity:sam_wifi on 2007/01/04 20:23:00

	make sure that the sc lock is held across rt2560_stop
	ensure that the sc lock is not held across ieee80211_ioctl

Affected files ...

.. //depot/projects/wifi/sys/dev/ral/rt2560.c#9 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ral/rt2560.c#9 (text) ====

@@ -349,8 +349,10 @@
 	struct rt2560_softc *sc = xsc;
 	struct ieee80211com *ic = &sc->sc_ic;
 	struct ifnet *ifp = ic->ic_ifp;
-
+	
+	RAL_LOCK(sc);
 	rt2560_stop(sc);
+	RAL_UNLOCK(sc);
 	callout_stop(&sc->watchdog_ch);
 	callout_stop(&sc->rssadapt_ch);
 
@@ -2074,10 +2076,11 @@
 	struct ieee80211com *ic = &sc->sc_ic;
 	int error = 0;
 
-	RAL_LOCK(sc);
+
 
 	switch (cmd) {
 	case SIOCSIFFLAGS:
+		RAL_LOCK(sc);
 		if (ifp->if_flags & IFF_UP) {
 			if (ifp->if_drv_flags & IFF_DRV_RUNNING)
 				rt2560_update_promisc(sc);
@@ -2087,6 +2090,7 @@
 			if (ifp->if_drv_flags & IFF_DRV_RUNNING)
 				rt2560_stop(sc);
 		}
+		RAL_UNLOCK(sc);
 		break;
 
 	default:
@@ -2101,7 +2105,6 @@
 		error = 0;
 	}
 
-	RAL_UNLOCK(sc);
 
 	return error;
 }


More information about the p4-projects mailing list