ath11k: WMI changes to support WCN6750
authorManikanta Pubbisetty <quic_mpubbise@quicinc.com>
Wed, 6 Apr 2022 09:41:04 +0000 (15:11 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Wed, 27 Apr 2022 07:25:59 +0000 (10:25 +0300)
WCN6750 is a single PDEV non-DBS chip which supports 2G, 5G and 6G bands.
It is a single LMAC device which can be either hooked to 2G/5G/6G bands.
Add WMI changes to support WCN6750.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00573-QCAMSLSWPLZ-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00192-QCAHKSWPL_SILICONZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220406094107.17878-11-quic_mpubbise@quicinc.com
drivers/net/wireless/ath/ath11k/wmi.c

index d7243819d9bd49f370b0c47d6798df2e953ebba2..3c0ac1e29479e0b4510281da08d0c330f69d0f04 100644 (file)
@@ -391,6 +391,10 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(struct ath11k_pdev_wmi *wmi_handle,
        ab->target_pdev_ids[ab->target_pdev_count].pdev_id = mac_phy_caps->pdev_id;
        ab->target_pdev_count++;
 
+       if (!(mac_phy_caps->supported_bands & WMI_HOST_WLAN_2G_CAP) &&
+           !(mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP))
+               return -EINVAL;
+
        /* Take non-zero tx/rx chainmask. If tx/rx chainmask differs from
         * band to band for a single radio, need to see how this should be
         * handled.
@@ -398,7 +402,9 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(struct ath11k_pdev_wmi *wmi_handle,
        if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_2G_CAP) {
                pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_2g;
                pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_2g;
-       } else if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) {
+       }
+
+       if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) {
                pdev_cap->vht_cap = mac_phy_caps->vht_cap_info_5g;
                pdev_cap->vht_mcs = mac_phy_caps->vht_supp_mcs_5g;
                pdev_cap->he_mcs = mac_phy_caps->he_supp_mcs_5g;
@@ -408,8 +414,6 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(struct ath11k_pdev_wmi *wmi_handle,
                        WMI_NSS_RATIO_ENABLE_DISABLE_GET(mac_phy_caps->nss_ratio);
                pdev_cap->nss_ratio_info =
                        WMI_NSS_RATIO_INFO_GET(mac_phy_caps->nss_ratio);
-       } else {
-               return -EINVAL;
        }
 
        /* tx/rx chainmask reported from fw depends on the actual hw chains used,