ath11k: copy cap info of 6G band under WMI_HOST_WLAN_5G_CAP for WCN6855
authorWen Gong <wgong@codeaurora.org>
Tue, 28 Sep 2021 11:00:43 +0000 (14:00 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 28 Sep 2021 13:22:22 +0000 (16:22 +0300)
WCN6855 has 2 phys, one is 2G, another is 5G/6G, so it should copy the
cap info of 6G band under the check of WMI_HOST_WLAN_5G_CAP as well as
for the 5G band. Some chips like QCN9074 only have 6G, not have 2G and
5G, and this 6G capability is also under WMI_HOST_WLAN_5G_CAP, so this
change will not disturb it.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1

Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210804181217.88751-4-jouni@codeaurora.org
drivers/net/wireless/ath/ath11k/wmi.c

index 568ef5a..cd7fac7 100644 (file)
@@ -407,18 +407,18 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(struct ath11k_pdev_wmi *wmi_handle,
                       sizeof(u32) * PSOC_HOST_MAX_PHY_SIZE);
                memcpy(&cap_band->he_ppet, &mac_phy_caps->he_ppet5g,
                       sizeof(struct ath11k_ppe_threshold));
-       }
 
-       cap_band = &pdev_cap->band[NL80211_BAND_6GHZ];
-       cap_band->max_bw_supported = mac_phy_caps->max_bw_supported_5g;
-       cap_band->ht_cap_info = mac_phy_caps->ht_cap_info_5g;
-       cap_band->he_cap_info[0] = mac_phy_caps->he_cap_info_5g;
-       cap_band->he_cap_info[1] = mac_phy_caps->he_cap_info_5g_ext;
-       cap_band->he_mcs = mac_phy_caps->he_supp_mcs_5g;
-       memcpy(cap_band->he_cap_phy_info, &mac_phy_caps->he_cap_phy_info_5g,
-              sizeof(u32) * PSOC_HOST_MAX_PHY_SIZE);
-       memcpy(&cap_band->he_ppet, &mac_phy_caps->he_ppet5g,
-              sizeof(struct ath11k_ppe_threshold));
+               cap_band = &pdev_cap->band[NL80211_BAND_6GHZ];
+               cap_band->max_bw_supported = mac_phy_caps->max_bw_supported_5g;
+               cap_band->ht_cap_info = mac_phy_caps->ht_cap_info_5g;
+               cap_band->he_cap_info[0] = mac_phy_caps->he_cap_info_5g;
+               cap_band->he_cap_info[1] = mac_phy_caps->he_cap_info_5g_ext;
+               cap_band->he_mcs = mac_phy_caps->he_supp_mcs_5g;
+               memcpy(cap_band->he_cap_phy_info, &mac_phy_caps->he_cap_phy_info_5g,
+                      sizeof(u32) * PSOC_HOST_MAX_PHY_SIZE);
+               memcpy(&cap_band->he_ppet, &mac_phy_caps->he_ppet5g,
+                      sizeof(struct ath11k_ppe_threshold));
+       }
 
        return 0;
 }