aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-11-05 22:13:16 +0100
committerFelix Fietkau <nbd@nbd.name>2017-11-16 15:23:35 +0100
commitf9fa266faf9a2fdea48cc2fb72fa5a7e52a527c0 (patch)
tree677b801ef85f44c54cea9c9b580fd38d139511aa /package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch
parenta8d751c243b9d840b97293b289adddb0df438358 (diff)
downloadupstream-f9fa266faf9a2fdea48cc2fb72fa5a7e52a527c0.tar.gz
upstream-f9fa266faf9a2fdea48cc2fb72fa5a7e52a527c0.tar.bz2
upstream-f9fa266faf9a2fdea48cc2fb72fa5a7e52a527c0.zip
mac80211: update to wireless-testing 2017-11-01
The wireless regdb is now loaded via firmware loading, CRDA support and built-in regdb support have been removed. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch')
-rw-r--r--package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch b/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch
new file mode 100644
index 0000000000..5d5329f27e
--- /dev/null
+++ b/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch
@@ -0,0 +1,61 @@
+From: Christian Lamparter <chunkeey@gmail.com>
+Date: Wed, 1 Nov 2017 21:01:57 +0100
+Subject: [PATCH] ath10k: fix recent bandwidth conversion bug
+
+The commit "cfg80211: make RATE_INFO_BW_20 the default" changed
+the index of RATE_INFO_BW_20, but the updates to ath10k missed
+the special bandwidth calculation case in
+ath10k_update_per_peer_tx_stats().
+
+Fixes: 842be75c77cb ("cfg80211: make RATE_INFO_BW_20 the default")
+Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+Patchwork-Id: 10037035
+Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
+---
+
+--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
++++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
+@@ -592,6 +592,9 @@ struct amsdu_subframe_hdr {
+
+ #define GROUP_ID_IS_SU_MIMO(x) ((x) == 0 || (x) == 63)
+
++static const u8 ath10k_bw_to_mac80211[] = { RATE_INFO_BW_20, RATE_INFO_BW_40,
++ RATE_INFO_BW_80, RATE_INFO_BW_160 };
++
+ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
+ struct ieee80211_rx_status *status,
+ struct htt_rx_desc *rxd)
+@@ -694,23 +697,7 @@ static void ath10k_htt_rx_h_rates(struct
+ if (sgi)
+ status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
+
+- switch (bw) {
+- /* 20MHZ */
+- case 0:
+- break;
+- /* 40MHZ */
+- case 1:
+- status->bw = RATE_INFO_BW_40;
+- break;
+- /* 80MHZ */
+- case 2:
+- status->bw = RATE_INFO_BW_80;
+- break;
+- case 3:
+- status->bw = RATE_INFO_BW_160;
+- break;
+- }
+-
++ status->bw = ath10k_bw_to_mac80211[bw];
+ status->encoding = RX_ENC_VHT;
+ break;
+ default:
+@@ -2297,7 +2284,7 @@ ath10k_update_per_peer_tx_stats(struct a
+ arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
+
+ arsta->txrate.nss = txrate.nss;
+- arsta->txrate.bw = txrate.bw + RATE_INFO_BW_20;
++ arsta->txrate.bw = ath10k_bw_to_mac80211[txrate.bw];
+ }
+
+ static void ath10k_htt_fetch_peer_stats(struct ath10k *ar,