mac80211: backport and update patches for ath10k
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
index 657b31f5a83ab6a0ce0ae839ca1140d8e7ba3152..c5c8b1063ab9608ada585cddc47a502438abc133 100644 (file)
@@ -4,13 +4,16 @@ starting with firmware 10.4.3.4.x series QCA changed the handling of the channel
 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;
        }
  
@@ -26,7 +29,7 @@ consider that this patch will not work with older firmwares anymore. to avoid un
                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;
@@ -42,7 +45,7 @@ consider that this patch will not work with older firmwares anymore. to avoid un
 +              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;