[PATCH v2 1/2][SRU][oem-5.14] Revert "ath11k: enable 6G channels for WCN6855"

You-Sheng Yang vicamo.yang at canonical.com
Fri Jan 28 12:04:23 UTC 2022


BugLink: https://bugs.launchpad.net/bugs/1954938

This reverts commit e290ec141c7581c6ac02a059bc9a72a42cd76421.

Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/net/wireless/ath/ath11k/mac.c | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 8e7c1753f22b..9619982dfdcb 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -6320,7 +6320,7 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar,
 					   u32 supported_bands)
 {
 	struct ieee80211_supported_band *band;
-	struct ath11k_hal_reg_capabilities_ext *reg_cap, *temp_reg_cap;
+	struct ath11k_hal_reg_capabilities_ext *reg_cap;
 	void *channels;
 	u32 phy_id;
 
@@ -6330,7 +6330,6 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar,
 		     ATH11K_NUM_CHANS);
 
 	reg_cap = &ar->ab->hal_reg_cap[ar->pdev_idx];
-	temp_reg_cap = reg_cap;
 
 	if (supported_bands & WMI_HOST_WLAN_2G_CAP) {
 		channels = kmemdup(ath11k_2ghz_channels,
@@ -6349,11 +6348,11 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar,
 
 		if (ar->ab->hw_params.single_pdev_only) {
 			phy_id = ath11k_get_phy_id(ar, WMI_HOST_WLAN_2G_CAP);
-			temp_reg_cap = &ar->ab->hal_reg_cap[phy_id];
+			reg_cap = &ar->ab->hal_reg_cap[phy_id];
 		}
 		ath11k_mac_update_ch_list(ar, band,
-					  temp_reg_cap->low_2ghz_chan,
-					  temp_reg_cap->high_2ghz_chan);
+					  reg_cap->low_2ghz_chan,
+					  reg_cap->high_2ghz_chan);
 	}
 
 	if (supported_bands & WMI_HOST_WLAN_5G_CAP) {
@@ -6373,15 +6372,9 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar,
 			band->n_bitrates = ath11k_a_rates_size;
 			band->bitrates = ath11k_a_rates;
 			ar->hw->wiphy->bands[NL80211_BAND_6GHZ] = band;
-
-			if (ar->ab->hw_params.single_pdev_only) {
-				phy_id = ath11k_get_phy_id(ar, WMI_HOST_WLAN_5G_CAP);
-				temp_reg_cap = &ar->ab->hal_reg_cap[phy_id];
-			}
-
 			ath11k_mac_update_ch_list(ar, band,
-						  temp_reg_cap->low_5ghz_chan,
-						  temp_reg_cap->high_5ghz_chan);
+						  reg_cap->low_5ghz_chan,
+						  reg_cap->high_5ghz_chan);
 		}
 
 		if (reg_cap->low_5ghz_chan < ATH11K_MIN_6G_FREQ) {
@@ -6404,12 +6397,12 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar,
 
 			if (ar->ab->hw_params.single_pdev_only) {
 				phy_id = ath11k_get_phy_id(ar, WMI_HOST_WLAN_5G_CAP);
-				temp_reg_cap = &ar->ab->hal_reg_cap[phy_id];
+				reg_cap = &ar->ab->hal_reg_cap[phy_id];
 			}
 
 			ath11k_mac_update_ch_list(ar, band,
-						  temp_reg_cap->low_5ghz_chan,
-						  temp_reg_cap->high_5ghz_chan);
+						  reg_cap->low_5ghz_chan,
+						  reg_cap->high_5ghz_chan);
 		}
 	}
 
-- 
2.33.1




More information about the kernel-team mailing list