diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-06-20 09:11:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-24 14:44:23 -0400 |
commit | f56e121df34563475f71efab38287b9ac028fe8c (patch) | |
tree | e02de04745dc593bae2e3b5d988281c54c7c0e30 | |
parent | 68185a4b37d8790196c7441cb3020cc489d9835f (diff) |
ath9k: fix queue depth accounting in ath_tx_txqaddbuf
ath_tx_txqaddbuf assumes that all the linked buffers in the queue passed
to it are part of the same A-MPDU or MPDU. The CAB queue rework violates
this assumption, which can cause the internal queue depth to go
negative.
Fix this by increasing the counter for all slots of [bf, bf->bf_lastbf]
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 7e19d9b5214e..bfb58a5f2fd0 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1778,9 +1778,13 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, | |||
1778 | } | 1778 | } |
1779 | 1779 | ||
1780 | if (!internal) { | 1780 | if (!internal) { |
1781 | txq->axq_depth++; | 1781 | while (bf) { |
1782 | if (bf_is_ampdu_not_probing(bf)) | 1782 | txq->axq_depth++; |
1783 | txq->axq_ampdu_depth++; | 1783 | if (bf_is_ampdu_not_probing(bf)) |
1784 | txq->axq_ampdu_depth++; | ||
1785 | |||
1786 | bf = bf->bf_lastbf->bf_next; | ||
1787 | } | ||
1784 | } | 1788 | } |
1785 | } | 1789 | } |
1786 | 1790 | ||