likelly for backward compatiblity with vht80 only capable clients.
this patch adjusts the handling to get vht160 to work again with official qca firmwares newer than 3.3
consider that this patch will not work with older firmwares anymore. to avoid undefined behaviour this we disable vht160 capability for outdated firmwares
+Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
+
+v2: fix trailing whitespace issue and fix some typos within the commit note
---
drivers/net/wireless/ath/ath10k/mac.c | 7 -------
drivers/net/wireless/ath/ath10k/wmi.c | 11 ++++++++---
2 files changed, 8 insertions(+), 10 deletions(-)
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -4415,13 +4415,6 @@ static struct ieee80211_sta_vht_cap ath1
+@@ -4445,13 +4445,6 @@ static struct ieee80211_sta_vht_cap ath1
vht_cap.cap |= val;
}
if ((i < ar->num_rf_chains) && (ar->cfg_tx_chainmask & BIT(i)))
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
-@@ -1660,13 +1660,18 @@ void ath10k_wmi_put_wmi_channel(struct w
+@@ -1672,13 +1672,18 @@ void ath10k_wmi_put_wmi_channel(struct w
flags |= WMI_CHAN_FLAG_HT40_PLUS;
if (arg->chan_radar)
flags |= WMI_CHAN_FLAG_DFS;
+ if (arg->freq < arg->band_center_freq1)
+ ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1 - 40);
+ else
-+ ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1 + 40);
++ ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1 + 40);
+ ch->band_center_freq2 = __cpu_to_le32(arg->band_center_freq1);
+ }
ch->min_power = arg->min_power;