Date: Sat, 10 Mar 2012 19:58:23 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r232794 - head/sys/dev/ath Message-ID: <201203101958.q2AJwN9M075897@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat Mar 10 19:58:23 2012 New Revision: 232794 URL: http://svn.freebsd.org/changeset/base/232794 Log: Fix a panic introduced in a previous commit - non-beaconing modes (eg STA) don't setup the avp mcast queue. This is a bit annoying though - it turns out the mcast queue isn't initialised for STA mode but it's then touched to see whether anything is in it. That should be fixed in a subsequent commit. Noticed by: gperez@entel.upc.edu PR: kern/165895 Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Mar 10 18:56:16 2012 (r232793) +++ head/sys/dev/ath/if_ath_tx.c Sat Mar 10 19:58:23 2012 (r232794) @@ -1409,15 +1409,12 @@ ath_tx_start(struct ath_softc *sc, struc */ if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { ATH_TXQ_LOCK(sc->sc_cabq); - ATH_TXQ_LOCK(&avp->av_mcastq); - if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) > - sc->sc_txq_mcastq_maxdepth) { + if (sc->sc_cabq->axq_depth > sc->sc_txq_mcastq_maxdepth) { sc->sc_stats.ast_tx_mcastq_overflow++; r = ENOBUFS; } - ATH_TXQ_UNLOCK(&avp->av_mcastq); ATH_TXQ_UNLOCK(sc->sc_cabq); if (r != 0) { @@ -1759,8 +1756,6 @@ ath_raw_xmit(struct ieee80211_node *ni, struct ath_softc *sc = ifp->if_softc; struct ath_buf *bf; struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); - struct ieee80211vap *vap = ni->ni_vap; - struct ath_vap *avp = ATH_VAP(vap); int error = 0; ATH_PCU_LOCK(sc); @@ -1790,15 +1785,12 @@ ath_raw_xmit(struct ieee80211_node *ni, */ if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { ATH_TXQ_LOCK(sc->sc_cabq); - ATH_TXQ_LOCK(&avp->av_mcastq); - if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) > - sc->sc_txq_mcastq_maxdepth) { + if (sc->sc_cabq->axq_depth > sc->sc_txq_mcastq_maxdepth) { sc->sc_stats.ast_tx_mcastq_overflow++; error = ENOBUFS; } - ATH_TXQ_UNLOCK(&avp->av_mcastq); ATH_TXQ_UNLOCK(sc->sc_cabq); if (error != 0) { Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Mar 10 18:56:16 2012 (r232793) +++ head/sys/dev/ath/if_athvar.h Sat Mar 10 19:58:23 2012 (r232794) @@ -547,10 +547,7 @@ struct ath_softc { * + data_minfree is the maximum number of free buffers * overall to successfully allow a data frame. * - * + mcastq_maxdepth is the maximum depth allowe dof the avp+cabq - * queue. The avp is included in each comparison just to be - * a little overly conservative and this may end up being - * unhelpful with multiple VAPs. + * + mcastq_maxdepth is the maximum depth allowed of the cabq. */ int sc_txq_data_minfree; int sc_txq_mcastq_maxdepth;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203101958.q2AJwN9M075897>