[lkml]   [2013]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.12 079/212] ath5k: fix regression in tx status processing
3.12-stable review patch.  If anyone has any objections, please let me know.


From: Felix Fietkau <>

commit 7ede612fd615abcda0cc30e5bef2a70f4cf4f75c upstream.

The regression was introduced in the following commit:

"ath5k: make use of the new rate control API"

ath5k_tx_frame_completed saves the intended per-rate retry counts before
they are cleared by ieee80211_tx_info_clear_status, however at this
point the information in info->status.rates is incomplete.

This causes significant throughput degradation and excessive packet loss
on links where high bit rates don't work properly.

Move the copy from bf->rates a few lines up to ensure that the saved
retry counts are updated, and that they are really cleared in
info->status.rates after the call to ieee80211_tx_info_clear_status.

Cc: Thomas Huehn <>
Cc: Benjamin Vahl <>
Reported-by: Ben West <>
Signed-off-by: Felix Fietkau <>
Acked-by: Thomas Huehn <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/net/wireless/ath/ath5k/base.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1663,15 +1663,15 @@ ath5k_tx_frame_completed(struct ath5k_hw
ah->stats.tx_bytes_count += skb->len;
info = IEEE80211_SKB_CB(skb);

+ size = min_t(int, sizeof(info->status.rates), sizeof(bf->rates));
+ memcpy(info->status.rates, bf->rates, size);
tries[0] = info->status.rates[0].count;
tries[1] = info->status.rates[1].count;
tries[2] = info->status.rates[2].count;


- size = min_t(int, sizeof(info->status.rates), sizeof(bf->rates));
- memcpy(info->status.rates, bf->rates, size);
for (i = 0; i < ts->ts_final_idx; i++) {
struct ieee80211_tx_rate *r =

 \ /
  Last update: 2013-12-03 02:21    [W:0.979 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site