diff options
author | adrian <adrian@FreeBSD.org> | 2013-03-15 20:00:08 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-03-15 20:00:08 +0000 |
commit | 90b1ba3bc42c541bb65e1492274cdbdeca8d1dea (patch) | |
tree | 5f28115d846d948cfdf649ec6dcad332134bf73e | |
parent | 9613a0ac27804da699d33959a2f1f0618f34abc4 (diff) | |
download | FreeBSD-src-90b1ba3bc42c541bb65e1492274cdbdeca8d1dea.zip FreeBSD-src-90b1ba3bc42c541bb65e1492274cdbdeca8d1dea.tar.gz |
Fix two bugs:
* when pulling frames off of the TID queue, the ATH_TID_REMOVE()
macro decrements the axq_depth field. So don't do it twice.
* in ath_tx_comp_cleanup_aggr(), bf wasn't being reset to bf_first
before walking the buffer list to complete buffers; so those buffers
will leak.
-rw-r--r-- | sys/dev/ath/if_ath_tx.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 97e6967..3fe2777 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -3757,7 +3757,8 @@ ath_tx_tid_cleanup(struct ath_softc *sc, struct ath_node *an, int tid) if (bf->bf_state.bfs_isretried) { bf_next = TAILQ_NEXT(bf, bf_list); ATH_TID_REMOVE(atid, bf, bf_list); - atid->axq_depth--; + // Don't need this anymore; ATH_TID_REMOVE() decrements it for us + //atid->axq_depth--; if (bf->bf_state.bfs_dobaw) { ath_tx_update_baw(sc, an, atid, bf); if (! bf->bf_state.bfs_addedbaw) @@ -4140,11 +4141,10 @@ ath_tx_comp_cleanup_aggr(struct ath_softc *sc, struct ath_buf *bf_first) int tid = bf_first->bf_state.bfs_tid; struct ath_tid *atid = &an->an_tid[tid]; - bf = bf_first; - ATH_TX_LOCK(sc); /* update incomp */ + bf = bf_first; while (bf) { atid->incomp--; bf = bf->bf_next; @@ -4160,12 +4160,17 @@ ath_tx_comp_cleanup_aggr(struct ath_softc *sc, struct ath_buf *bf_first) /* Send BAR if required */ /* XXX why would we send a BAR when transitioning to non-aggregation? */ + /* + * XXX TODO: we should likely just tear down the BAR state here, + * rather than sending a BAR. + */ if (ath_tx_tid_bar_tx_ready(sc, atid)) ath_tx_tid_bar_tx(sc, atid); ATH_TX_UNLOCK(sc); /* Handle frame completion */ + bf = bf_first; while (bf) { bf_next = bf->bf_next; ath_tx_default_comp(sc, bf, 1); |