ath5k: fix tx status processing errors (causing packet loss and throughput issues)
authorFelix Fietkau <nbd@openwrt.org>
Mon, 14 Oct 2013 19:20:05 +0000 (19:20 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 14 Oct 2013 19:20:05 +0000 (19:20 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 38396

package/kernel/mac80211/patches/300-pending_work.patch

index 42b68093059072c8a4ce56ccc7ae994a8fdc4491..91781f92fd6b33905fd89e69c6d560b4d6aa1ad3 100644 (file)
                    (ah->curchan->channel < caldata->channel) &&
                    (ah->curchan->channel >= caldata->channel - 20))
                        return;
+--- a/drivers/net/wireless/ath/ath5k/base.c
++++ b/drivers/net/wireless/ath/ath5k/base.c
+@@ -1628,15 +1628,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;
+       ieee80211_tx_info_clear_status(info);
+-      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 =
+                       &info->status.rates[i];