wifi: ath12k: advertise MLO support and capabilities
authorRameshkumar Sundaram <quic_ramess@quicinc.com>
Wed, 11 Dec 2024 15:43:58 +0000 (17:43 +0200)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 16 Dec 2024 20:46:59 +0000 (12:46 -0800)
Now everything in ath12k is in place and we can enable Multi-Link Operation
(MLO) in the driver. For now it's only enabled for QCN9274 with firmware having
ATH12K_FW_FEATURE_MLO feature bit set.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241211154358.776279-8-kvalo@kernel.org
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/wmi.c
drivers/net/wireless/ath/ath12k/wmi.h

index d07b54f441c3e645af24f140b1d15296ce0eb490..ec61ad3d82c3bb9237cf327976e9f68e8c8f9cc7 100644 (file)
@@ -773,6 +773,8 @@ struct ath12k_pdev_cap {
        u32 tx_chain_mask_shift;
        u32 rx_chain_mask_shift;
        struct ath12k_band_cap band[NUM_NL80211_BANDS];
+       u32 eml_cap;
+       u32 mld_cap;
 };
 
 struct mlo_timestamp {
index f7e505470f2159ef5533bbed456b3c505c800637..186765fa95f5302b8188419cbf6073624413a774 100644 (file)
@@ -10693,7 +10693,7 @@ static const u8 ath12k_if_types_ext_capa_ap[] = {
        [10] = WLAN_EXT_CAPA11_EMA_SUPPORT,
 };
 
-static const struct wiphy_iftype_ext_capab ath12k_iftypes_ext_capa[] = {
+static struct wiphy_iftype_ext_capab ath12k_iftypes_ext_capa[] = {
        {
                .extended_capabilities = ath12k_if_types_ext_capa,
                .extended_capabilities_mask = ath12k_if_types_ext_capa,
@@ -10710,6 +10710,8 @@ static const struct wiphy_iftype_ext_capab ath12k_iftypes_ext_capa[] = {
                .extended_capabilities_mask = ath12k_if_types_ext_capa_ap,
                .extended_capabilities_len =
                                sizeof(ath12k_if_types_ext_capa_ap),
+               .eml_capabilities = 0,
+               .mld_capa_and_ops = 0,
        },
 };
 
@@ -10919,6 +10921,15 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
         */
        wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
 
+       /* Copy over MLO related capabilities received from
+        * WMI_SERVICE_READY_EXT2_EVENT if single_chip_mlo_supp is set.
+        */
+       if (ab->ag->mlo_capable) {
+               ath12k_iftypes_ext_capa[2].eml_capabilities = cap->eml_cap;
+               ath12k_iftypes_ext_capa[2].mld_capa_and_ops = cap->mld_cap;
+               wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO;
+       }
+
        hw->queues = ATH12K_HW_MAX_QUEUES;
        wiphy->tx_queue_len = ATH12K_QUEUE_LEN;
        hw->offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1;
index 3bc3ed29e4298e357ba3bbfabfcd8b51cc7a7b20..562b0615ed065d094f5d7709cafeb22c41f02d17 100644 (file)
@@ -4662,6 +4662,9 @@ ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab,
                                          caps->eht_cap_info_internal);
        }
 
+       pdev->cap.eml_cap = le32_to_cpu(caps->eml_capability);
+       pdev->cap.mld_cap = le32_to_cpu(caps->mld_capability);
+
        return 0;
 }
 
index cd3de0a6554393fc454318d4a0478bc287885879..b6a197389277b4520bd3fb20b21a504092680531 100644 (file)
@@ -2716,6 +2716,8 @@ struct ath12k_wmi_caps_ext_params {
        __le32 eht_cap_info_internal;
        __le32 eht_supp_mcs_ext_2ghz[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
        __le32 eht_supp_mcs_ext_5ghz[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
+       __le32 eml_capability;
+       __le32 mld_capability;
 } __packed;
 
 /* 2 word representation of MAC addr */