diff options
author | adrian <adrian@FreeBSD.org> | 2012-03-10 19:58:23 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-03-10 19:58:23 +0000 |
commit | 2251c534df3c1ac912ca48b45301cbbba1a8d425 (patch) | |
tree | 971d20a0a4d248805e19469fb2c7b2e6858b2c09 | |
parent | 4be9351f8bd44209a6e7521658b3da16c1951098 (diff) | |
download | FreeBSD-src-2251c534df3c1ac912ca48b45301cbbba1a8d425.zip FreeBSD-src-2251c534df3c1ac912ca48b45301cbbba1a8d425.tar.gz |
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
-rw-r--r-- | sys/dev/ath/if_ath_tx.c | 12 | ||||
-rw-r--r-- | sys/dev/ath/if_athvar.h | 5 |
2 files changed, 3 insertions, 14 deletions
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 53c9320..9c78a78 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -1409,15 +1409,12 @@ ath_tx_start(struct ath_softc *sc, 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++; 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 mbuf *m, 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, struct mbuf *m, */ 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) { diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 426c520..f53bb88 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -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; |