Date: Thu, 13 Oct 2011 13:40:15 GMT From: Bernhard Schmidt <bschmidt@freebsd.org> To: freebsd-wireless@FreeBSD.org Subject: Re: kern/161407: [iwn] iwn panic on 9.0-BETA3 Message-ID: <201110131340.p9DDeFZg089486@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/161407; it has been noted by GNATS. From: Bernhard Schmidt <bschmidt@freebsd.org> To: Rene Ladan <rene@freebsd.org> Cc: bug-followup@freebsd.org Subject: Re: kern/161407: [iwn] iwn panic on 9.0-BETA3 Date: Thu, 13 Oct 2011 15:06:17 +0200 --Boundary-00=_JJulOFQ1TNWsRFT Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Hi, been able to reproduce the panic with an added hack (iwn_bmiss.diff) to simulate a beacon miss scenario. Once in RUN state and an AMPDU TX session has been started (check debug output of wlandebug +action), doing for x in $(seq 1 100); do sysctl dev.iwn.0.bmiss=1 sleep 0.01 done while trigger it. Attached patch (iwn_addba_stop.diff) fixed the issue for me. Wanna give it a shot? Thanks -- Bernhard --Boundary-00=_JJulOFQ1TNWsRFT Content-Type: text/x-patch; charset="ISO-8859-1"; name="iwn_addba_stop.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="iwn_addba_stop.diff" Index: if_iwn.c =================================================================== --- if_iwn.c (revision 226336) +++ if_iwn.c (working copy) @@ -5641,6 +5641,7 @@ iwn_ampdu_tx_stop(struct ieee80211_node *ni, struc sc->qid2tap[qid] = NULL; free(tap->txa_private, M_DEVBUF); tap->txa_private = NULL; + sc->sc_addba_stop(ni, tap); } static void --Boundary-00=_JJulOFQ1TNWsRFT Content-Type: text/x-patch; charset="ISO-8859-1"; name="iwn_bmiss.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="iwn_bmiss.diff" Index: if_iwnvar.h =================================================================== --- if_iwnvar.h (revision 226336) +++ if_iwnvar.h (working copy) @@ -200,6 +200,7 @@ struct iwn_softc { struct ifnet *sc_ifp; int sc_debug; + int sc_bmiss; struct mtx sc_mtx; Index: if_iwn.c =================================================================== --- if_iwn.c (revision 226336) +++ if_iwn.c (working copy) @@ -841,6 +841,10 @@ iwn_sysctlattach(struct iwn_softc *sc) SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, 0, "control debugging printfs"); #endif + + sc->sc_bmiss = 0; + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "bmiss", CTLFLAG_RW, &sc->sc_bmiss, 0, "simulate beacon miss"); } static struct ieee80211vap * @@ -3138,6 +3148,20 @@ iwn_intr(void *arg) /* Disable interrupts. */ IWN_WRITE(sc, IWN_INT_MASK, 0); + if (sc->sc_bmiss) { + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + + sc->sc_bmiss = 0; + + if (vap->iv_state == IEEE80211_S_RUN && + (ic->ic_flags & IEEE80211_F_SCAN) == 0) { + IWN_UNLOCK(sc); + ieee80211_beacon_miss(ic); + IWN_LOCK(sc); + } + } + /* Read interrupts from ICT (fast) or from registers (slow). */ if (sc->sc_flags & IWN_FLAG_USE_ICT) { tmp = 0; --Boundary-00=_JJulOFQ1TNWsRFT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110131340.p9DDeFZg089486>