From owner-p4-projects@FreeBSD.ORG Fri Jul 4 17:33:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF4B3106567D; Fri, 4 Jul 2008 17:33:13 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 822E01065675 for ; Fri, 4 Jul 2008 17:33:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6FF228FC19 for ; Fri, 4 Jul 2008 17:33:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m64HXD7A047893 for ; Fri, 4 Jul 2008 17:33:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m64HXDhM047891 for perforce@freebsd.org; Fri, 4 Jul 2008 17:33:13 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 4 Jul 2008 17:33:13 GMT Message-Id: <200807041733.m64HXDhM047891@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 144642 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2008 17:33:14 -0000 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); } /*