Date: Thu, 4 Jan 2007 20:23:42 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 112490 for review Message-ID: <200701042023.l04KNg4A010816@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112490 Change 112490 by kmacy@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701042023.l04KNg4A010816>