ath11k: set correct NL80211_FEATURE_DYNAMIC_SMPS for WCN6855
authorWen Gong <wgong@codeaurora.org>
Thu, 28 Oct 2021 07:46:28 +0000 (10:46 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 1 Nov 2021 14:13:36 +0000 (16:13 +0200)
Commit 6f4d70308e5e ("ath11k: support SMPS configuration for 6 GHz") changed
"if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS)" to "if (ht_cap &
WMI_HT_CAP_DYNAMIC_SMPS || ar->supports_6ghz)" which means
NL80211_FEATURE_DYNAMIC_SMPS is enabled for all chips which support 6 GHz.
However, WCN6855 supports 6 GHz but it does not support feature
NL80211_FEATURE_DYNAMIC_SMPS, and this can lead to MU-MIMO test failures for
WCN6855.

Disable NL80211_FEATURE_DYNAMIC_SMPS for WCN6855 since its ht_cap does not
support WMI_HT_CAP_DYNAMIC_SMPS. Enable the feature only on QCN9074 as that's
the only other device supporting 6 GHz band.

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/20210914163726.38604-3-jouni@codeaurora.org
drivers/net/wireless/ath/ath11k/core.c
drivers/net/wireless/ath/ath11k/hw.h
drivers/net/wireless/ath/ath11k/mac.c

index b5a2af3ffc3e15936887bca6722dfce883738c7d..7ee2ccc49c7472d53b6d53a00f4cad2d2b19fcd1 100644 (file)
@@ -82,6 +82,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
                .fix_l1ss = true,
                .max_tx_ring = DP_TCL_NUM_RING_MAX,
                .hal_params = &ath11k_hw_hal_params_ipq8074,
+               .supports_dynamic_smps_6ghz = false,
        },
        {
                .hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -131,6 +132,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
                .fix_l1ss = true,
                .max_tx_ring = DP_TCL_NUM_RING_MAX,
                .hal_params = &ath11k_hw_hal_params_ipq8074,
+               .supports_dynamic_smps_6ghz = false,
        },
        {
                .name = "qca6390 hw2.0",
@@ -179,6 +181,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
                .fix_l1ss = true,
                .max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
                .hal_params = &ath11k_hw_hal_params_qca6390,
+               .supports_dynamic_smps_6ghz = false,
        },
        {
                .name = "qcn9074 hw1.0",
@@ -227,6 +230,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
                .fix_l1ss = true,
                .max_tx_ring = DP_TCL_NUM_RING_MAX,
                .hal_params = &ath11k_hw_hal_params_ipq8074,
+               .supports_dynamic_smps_6ghz = true,
        },
        {
                .name = "wcn6855 hw2.0",
@@ -275,6 +279,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
                .fix_l1ss = false,
                .max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
                .hal_params = &ath11k_hw_hal_params_qca6390,
+               .supports_dynamic_smps_6ghz = false,
        },
 };
 
index 19223d36846e810d741e408ae056c741a74e6b5d..6dcac596e3fe5689dd8bf1226dd9cf604fa6793f 100644 (file)
@@ -176,6 +176,7 @@ struct ath11k_hw_params {
        bool fix_l1ss;
        u8 max_tx_ring;
        const struct ath11k_hw_hal_params *hal_params;
+       bool supports_dynamic_smps_6ghz;
 };
 
 struct ath11k_hw_ops {
index 1cc55602787bbba37f565df24d6a9c4162ab3c1d..50a6f88115cdc2ee3583e6d524ae62df7cd3c8bc 100644 (file)
@@ -7672,7 +7672,8 @@ static int __ath11k_mac_register(struct ath11k *ar)
         * for each band for a dual band capable radio. It will be tricky to
         * handle it when the ht capability different for each band.
         */
-       if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS || ar->supports_6ghz)
+       if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS ||
+           (ar->supports_6ghz && ab->hw_params.supports_dynamic_smps_6ghz))
                ar->hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS;
 
        ar->hw->wiphy->max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID;