From 9a89e44e069e026291f10795f505840a0a302596 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Wed, 26 May 2010 19:47:05 -0700 Subject: [PATCH] compat-wireless: add pending fix patch for ath9k This adds this pending patch: From: Vasanthakumar Thiagarajan Subject: [PATCH] ath9k: Fix bug in the way "bf_tx_aborted" of struct ath_buf is used Date: Wed, 26 May 2010 19:06:53 -0700 This bug was introduced by the following commit Author: Vasanthakumar Thiagarajan Date: Thu Apr 15 17:38:46 2010 -0400 ath9k: Remove ATH9K_TX_SW_ABORTED and introduce a bool for this purpose Wrong buffer is checked for bf_tx_aborted field in ath_tx_num_badfrms(), this may result in a rate scaling with wrong feedback (number of unacked frames in this case). It is the last one in the chain of buffers for an aggregate frame that should be checked. Also it misses the initialization of this field in the buffer, this may lead to a situation where we stop the sw retransmission of failed subframes associated to this buffer. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Luis R. Rodriguez --- .../0021-ath9k-Fix-bug-in-the-way.patch | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 linux-next-pending/0021-ath9k-Fix-bug-in-the-way.patch diff --git a/linux-next-pending/0021-ath9k-Fix-bug-in-the-way.patch b/linux-next-pending/0021-ath9k-Fix-bug-in-the-way.patch new file mode 100644 index 000000000000..e1bb701a8b99 --- /dev/null +++ b/linux-next-pending/0021-ath9k-Fix-bug-in-the-way.patch @@ -0,0 +1,49 @@ +From: Vasanthakumar Thiagarajan +Subject: [PATCH] ath9k: Fix bug in the way "bf_tx_aborted" of struct ath_buf is used +Date: Wed, 26 May 2010 19:06:53 -0700 + +This bug was introduced by the following commit + + Author: Vasanthakumar Thiagarajan + Date: Thu Apr 15 17:38:46 2010 -0400 + + ath9k: Remove ATH9K_TX_SW_ABORTED and introduce a bool for this purpose + +Wrong buffer is checked for bf_tx_aborted field in ath_tx_num_badfrms(), +this may result in a rate scaling with wrong feedback (number +of unacked frames in this case). It is the last one in the chain +of buffers for an aggregate frame that should be checked. + +Also it misses the initialization of this field in the buffer, +this may lead to a situation where we stop the sw retransmission +of failed subframes associated to this buffer. + +Signed-off-by: Vasanthakumar Thiagarajan +--- + drivers/net/wireless/ath/ath9k/xmit.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c +index 3db1917..c575552 100644 +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1728,6 +1728,8 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, + } else + bf->bf_isnullfunc = false; + ++ bf->bf_tx_aborted = false; ++ + return 0; + } + +@@ -1989,7 +1991,7 @@ static int ath_tx_num_badfrms(struct ath_softc *sc, struct ath_buf *bf, + int nbad = 0; + int isaggr = 0; + +- if (bf->bf_tx_aborted) ++ if (bf->bf_lastbf->bf_tx_aborted) + return 0; + + isaggr = bf_isaggr(bf); +-- +1.7.0.4 -- 2.30.2