]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.36.2/ath9k-fix-tx-aggregation-flush-on-ar9003.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / ath9k-fix-tx-aggregation-flush-on-ar9003.patch
1 From e609e2ea2cdb3448e7849703179cd792a28dcc55 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@openwrt.org>
3 Date: Wed, 27 Oct 2010 02:15:05 +0200
4 Subject: ath9k: fix tx aggregation flush on AR9003
5
6 From: Felix Fietkau <nbd@openwrt.org>
7
8 commit e609e2ea2cdb3448e7849703179cd792a28dcc55 upstream.
9
10 Completing aggregate frames can lead to new buffers being pushed into
11 the tid queues due to software retransmission.
12 When the tx queues are being drained, all pending aggregates must be
13 completed before the tid queues get drained, otherwise buffers might be
14 leaked.
15
16 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
17 Signed-off-by: John W. Linville <linville@tuxdriver.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 drivers/net/wireless/ath/ath9k/xmit.c | 18 +++++++++---------
22 1 file changed, 9 insertions(+), 9 deletions(-)
23
24 --- a/drivers/net/wireless/ath/ath9k/xmit.c
25 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
26 @@ -1101,15 +1101,6 @@ void ath_draintxq(struct ath_softc *sc,
27 txq->axq_tx_inprogress = false;
28 spin_unlock_bh(&txq->axq_lock);
29
30 - /* flush any pending frames if aggregation is enabled */
31 - if (sc->sc_flags & SC_OP_TXAGGR) {
32 - if (!retry_tx) {
33 - spin_lock_bh(&txq->axq_lock);
34 - ath_txq_drain_pending_buffers(sc, txq);
35 - spin_unlock_bh(&txq->axq_lock);
36 - }
37 - }
38 -
39 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
40 spin_lock_bh(&txq->axq_lock);
41 while (!list_empty(&txq->txq_fifo_pending)) {
42 @@ -1130,6 +1121,15 @@ void ath_draintxq(struct ath_softc *sc,
43 }
44 spin_unlock_bh(&txq->axq_lock);
45 }
46 +
47 + /* flush any pending frames if aggregation is enabled */
48 + if (sc->sc_flags & SC_OP_TXAGGR) {
49 + if (!retry_tx) {
50 + spin_lock_bh(&txq->axq_lock);
51 + ath_txq_drain_pending_buffers(sc, txq);
52 + spin_unlock_bh(&txq->axq_lock);
53 + }
54 + }
55 }
56
57 void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)