]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.6.7/ath9k-test-for-tid-only-in-blockacks-while-checking-tx-status.patch
Linux 3.6.7
[thirdparty/kernel/stable-queue.git] / releases / 3.6.7 / ath9k-test-for-tid-only-in-blockacks-while-checking-tx-status.patch
CommitLineData
2d3823c0
GKH
1From 6fe7cc71bbf3a0bc28c9cec3c00bc11e81344412 Mon Sep 17 00:00:00 2001
2From: Sven Eckelmann <sven@narfation.org>
3Date: Mon, 29 Oct 2012 13:25:20 +0100
4Subject: ath9k: Test for TID only in BlockAcks while checking tx status
5
6From: Sven Eckelmann <sven@narfation.org>
7
8commit 6fe7cc71bbf3a0bc28c9cec3c00bc11e81344412 upstream.
9
10The ath9k xmit functions for AMPDUs can send frames as non-aggregate in case
11only one frame is currently available. The client will then answer using a
12normal Ack instead of a BlockAck. This acknowledgement has no TID stored and
13therefore the hardware is not able to provide us the corresponding TID.
14
15The TID set by the hardware in the tx status descriptor has to be seen as
16undefined and not as a valid TID value for normal acknowledgements. Doing
17otherwise results in a massive amount of retransmissions and stalls of
18connections.
19
20Users may experience low bandwidth and complete connection stalls in
21environments with transfers using multiple TIDs.
22
23This regression was introduced in b11b160defc48e4daa283f785192ea3a23a51f8e
24("ath9k: validate the TID in the tx status information").
25
26Signed-off-by: Sven Eckelmann <sven@narfation.org>
27Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
28Acked-by: Felix Fietkau <nbd@openwrt.org>
29Signed-off-by: John W. Linville <linville@tuxdriver.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31
32---
33 drivers/net/wireless/ath/ath9k/xmit.c | 8 ++++++--
34 1 file changed, 6 insertions(+), 2 deletions(-)
35
36--- a/drivers/net/wireless/ath/ath9k/xmit.c
37+++ b/drivers/net/wireless/ath/ath9k/xmit.c
38@@ -394,7 +394,7 @@ static void ath_tx_complete_aggr(struct
39 u16 seq_st = 0, acked_cnt = 0, txfail_cnt = 0, seq_first;
40 u32 ba[WME_BA_BMP_SIZE >> 5];
41 int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
42- bool rc_update = true;
43+ bool rc_update = true, isba;
44 struct ieee80211_tx_rate rates[4];
45 struct ath_frame_info *fi;
46 int nframes;
47@@ -438,13 +438,17 @@ static void ath_tx_complete_aggr(struct
48 tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
49 tid = ATH_AN_2_TID(an, tidno);
50 seq_first = tid->seq_start;
51+ isba = ts->ts_flags & ATH9K_TX_BA;
52
53 /*
54 * The hardware occasionally sends a tx status for the wrong TID.
55 * In this case, the BA status cannot be considered valid and all
56 * subframes need to be retransmitted
57+ *
58+ * Only BlockAcks have a TID and therefore normal Acks cannot be
59+ * checked
60 */
61- if (tidno != ts->tid)
62+ if (isba && tidno != ts->tid)
63 txok = false;
64
65 isaggr = bf_isaggr(bf);