Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jul 2008 17:33:13 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 144642 for review
Message-ID:  <200807041733.m64HXDhM047891@repoman.freebsd.org>

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

Change 144642 by hselasky@hselasky_laptop001 on 2008/07/04 17:32:31

	
	Revert some changes to "ieee80211_proto.c" and
	implement the correct solution for the problem
	I tried to patch after advice from Sam Leffler.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#4 edit
.. //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#5 edit
.. //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#4 edit
.. //depot/projects/usb/src/sys/net80211/ieee80211_proto.c#9 integrate

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#4 (text+ko) ====

@@ -1526,11 +1526,19 @@
 static int
 rum_newstate_cb(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
+	struct rum_vap *uvp = RUM_VAP(vap);
 	struct ieee80211com *ic = vap->iv_ic;
 	struct rum_softc *sc = ic->ic_ifp->if_softc;
 
 	DPRINTF(0, "setting new state: %d\n", nstate);
 
+	if (usb2_config_td_is_gone(&(sc->sc_config_td))) {
+		/* Special case which happens at detach. */
+		if (nstate == IEEE80211_S_INIT) {
+			(uvp->newstate) (vap, nstate, arg);
+		}
+		return (0);		/* nothing to do */
+	}
 	mtx_lock(&(sc->sc_mtx));
 
 	/* store next state */

==== //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#5 (text+ko) ====

@@ -1519,11 +1519,19 @@
 static int
 ural_newstate_cb(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
+	struct ural_vap *uvp = URAL_VAP(vap);
 	struct ieee80211com *ic = vap->iv_ic;
 	struct ural_softc *sc = ic->ic_ifp->if_softc;
 
 	DPRINTF(0, "setting new state: %d\n", nstate);
 
+	if (usb2_config_td_is_gone(&(sc->sc_config_td))) {
+		/* Special case which happens at detach. */
+		if (nstate == IEEE80211_S_INIT) {
+			(uvp->newstate) (vap, nstate, arg);
+		}
+		return (0);		/* nothing to do */
+	}
 	mtx_lock(&(sc->sc_mtx));
 
 	/* store next state */

==== //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#4 (text+ko) ====

@@ -2127,11 +2127,19 @@
 static int
 zyd_newstate_cb(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
+	struct zyd_vap *uvp = ZYD_VAP(vap);
 	struct ieee80211com *ic = vap->iv_ic;
 	struct zyd_softc *sc = ic->ic_ifp->if_softc;
 
 	DPRINTF(0, "setting new state: %d\n", nstate);
 
+	if (usb2_config_td_is_gone(&(sc->sc_config_td))) {
+		/* Special case which happens at detach. */
+		if (nstate == IEEE80211_S_INIT) {
+			(uvp->newstate) (vap, nstate, arg);
+		}
+		return (0);		/* nothing to do */
+	}
 	mtx_lock(&(sc->sc_mtx));
 
 	/* store next state */

==== //depot/projects/usb/src/sys/net80211/ieee80211_proto.c#9 (text+ko) ====

@@ -241,8 +241,6 @@
 	FREEAPPIE(vap->iv_appie_assocresp);
 	FREEAPPIE(vap->iv_appie_wpa);
 #undef FREEAPPIE
-	callout_drain(&vap->iv_swbmiss);
-	callout_drain(&vap->iv_mgtsend);
 }
 
 /*



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