Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 7ede612

Browse files
Felix Fietkaulinvjw
authored andcommitted
ath5k: fix regression in tx status processing
The regression was introduced in the following commit: 0967e01 "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: [email protected] # 3.10+ Cc: Thomas Huehn <[email protected]> Cc: Benjamin Vahl <[email protected]> Reported-by: Ben West <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Acked-by: Thomas Huehn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 334300f commit 7ede612

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/wireless/ath/ath5k

1 file changed

+3
-3
lines changed

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,15 +1663,15 @@ ath5k_tx_frame_completed(struct ath5k_hw *ah, struct sk_buff *skb,
16631663
ah->stats.tx_bytes_count += skb->len;
16641664
info = IEEE80211_SKB_CB(skb);
16651665

1666+
size = min_t(int, sizeof(info->status.rates), sizeof(bf->rates));
1667+
memcpy(info->status.rates, bf->rates, size);
1668+
16661669
tries[0] = info->status.rates[0].count;
16671670
tries[1] = info->status.rates[1].count;
16681671
tries[2] = info->status.rates[2].count;
16691672

16701673
ieee80211_tx_info_clear_status(info);
16711674

1672-
size = min_t(int, sizeof(info->status.rates), sizeof(bf->rates));
1673-
memcpy(info->status.rates, bf->rates, size);
1674-
16751675
for (i = 0; i < ts->ts_final_idx; i++) {
16761676
struct ieee80211_tx_rate *r =
16771677
&info->status.rates[i];

0 commit comments

Comments
 (0)