Skip to content

Commit

Permalink
ath9k: fix queue depth accounting in ath_tx_txqaddbuf
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jun 24, 2013
1 parent 68185a4 commit f56e121
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,9 +1778,13 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
}

if (!internal) {
txq->axq_depth++;
if (bf_is_ampdu_not_probing(bf))
txq->axq_ampdu_depth++;
while (bf) {
txq->axq_depth++;
if (bf_is_ampdu_not_probing(bf))
txq->axq_ampdu_depth++;

bf = bf->bf_lastbf->bf_next;
}
}
}

Expand Down

0 comments on commit f56e121

Please sign in to comment.