]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: Send MCS15 support to firmware during peer assoc
authorMohan Kumar G <quic_mkumarg@quicinc.com>
Mon, 5 May 2025 15:35:36 +0000 (21:05 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 20 May 2025 14:55:02 +0000 (07:55 -0700)
As per IEEE 802.11be-2024 - 9.4.2.321, EHT operation element
contains MCS15 Disable subfield as the sixth bit, which is set when
MCS15 support is not enabled.

During association, firmware will use this MCS15 flag to enable or
disable the reception of PPDU with EHT-MCS15 capability.

Send MCS15 support to firmware through WMI command during peer assoc.

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

Co-developed-by: Dhanavandhana Kannan <quic_dhanavan1@quicinc.com>
Signed-off-by: Dhanavandhana Kannan <quic_dhanavan1@quicinc.com>
Signed-off-by: Mohan Kumar G <quic_mkumarg@quicinc.com>
Link: https://patch.msgid.link/20250505153536.3275145-1-quic_mkumarg@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/wmi.c
drivers/net/wireless/ath/ath12k/wmi.h

index fa39537fa4ce8a4a2aad5aff87868aeaecd73565..c485a7266eefef6677f1b8b6d630f6ae1b154dc5 100644 (file)
@@ -2939,6 +2939,7 @@ static void ath12k_peer_assoc_h_eht(struct ath12k *ar,
        const struct ieee80211_sta_eht_cap *eht_cap;
        const struct ieee80211_sta_he_cap *he_cap;
        struct ieee80211_link_sta *link_sta;
+       struct ieee80211_bss_conf *link_conf;
        u32 *rx_mcs, *tx_mcs;
 
        lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
@@ -2950,6 +2951,12 @@ static void ath12k_peer_assoc_h_eht(struct ath12k *ar,
                return;
        }
 
+       link_conf = ath12k_mac_get_link_bss_conf(arvif);
+       if (!link_conf) {
+               ath12k_warn(ar->ab, "unable to access link_conf in peer assoc eht set\n");
+               return;
+       }
+
        eht_cap = &link_sta->eht_cap;
        he_cap = &link_sta->he_cap;
        if (!he_cap->has_he || !eht_cap->has_eht)
@@ -3021,6 +3028,7 @@ static void ath12k_peer_assoc_h_eht(struct ath12k *ar,
        }
 
        arg->punct_bitmap = ~arvif->punct_bitmap;
+       arg->eht_disable_mcs15 = link_conf->eht_disable_mcs15;
 }
 
 static void ath12k_peer_assoc_h_mlo(struct ath12k_link_sta *arsta,
index 53bed1019f6b9d5f7a8e048529d34beb62be4815..72e7730c7694bc7a5fdcf007fee1310bf67b5654 100644 (file)
@@ -2399,6 +2399,10 @@ skip_ml_params:
                ptr += sizeof(*eht_mcs);
        }
 
+       /* Update MCS15 capability */
+       if (arg->eht_disable_mcs15)
+               cmd->peer_eht_ops = cpu_to_le32(IEEE80211_EHT_OPER_MCS15_DISABLE);
+
        tlv = ptr;
        len = arg->ml.enabled ? arg->ml.num_partner_links * sizeof(*partner_info) : 0;
        /* fill ML Partner links */
@@ -2439,7 +2443,7 @@ skip_ml_params:
 
 send:
        ath12k_dbg(ar->ab, ATH12K_DBG_WMI,
-                  "wmi peer assoc vdev id %d assoc id %d peer mac %pM peer_flags %x rate_caps %x peer_caps %x listen_intval %d ht_caps %x max_mpdu %d nss %d phymode %d peer_mpdu_density %d vht_caps %x he cap_info %x he ops %x he cap_info_ext %x he phy %x %x %x peer_bw_rxnss_override %x peer_flags_ext %x eht mac_cap %x %x eht phy_cap %x %x %x\n",
+                  "wmi peer assoc vdev id %d assoc id %d peer mac %pM peer_flags %x rate_caps %x peer_caps %x listen_intval %d ht_caps %x max_mpdu %d nss %d phymode %d peer_mpdu_density %d vht_caps %x he cap_info %x he ops %x he cap_info_ext %x he phy %x %x %x peer_bw_rxnss_override %x peer_flags_ext %x eht mac_cap %x %x eht phy_cap %x %x %x peer_eht_ops %x\n",
                   cmd->vdev_id, cmd->peer_associd, arg->peer_mac,
                   cmd->peer_flags, cmd->peer_rate_caps, cmd->peer_caps,
                   cmd->peer_listen_intval, cmd->peer_ht_caps,
@@ -2452,7 +2456,7 @@ send:
                   cmd->peer_bw_rxnss_override, cmd->peer_flags_ext,
                   cmd->peer_eht_cap_mac[0], cmd->peer_eht_cap_mac[1],
                   cmd->peer_eht_cap_phy[0], cmd->peer_eht_cap_phy[1],
-                  cmd->peer_eht_cap_phy[2]);
+                  cmd->peer_eht_cap_phy[2], cmd->peer_eht_ops);
 
        ret = ath12k_wmi_cmd_send(wmi, skb, WMI_PEER_ASSOC_CMDID);
        if (ret) {
index 811bc659945f1a4f4e0cda5c6ca9f60efac32a34..ac18f75e04492b62594acb159e3b43b81bd6c392 100644 (file)
@@ -3855,6 +3855,7 @@ struct ath12k_wmi_peer_assoc_arg {
        u32 punct_bitmap;
        bool is_assoc;
        struct peer_assoc_mlo_params ml;
+       bool eht_disable_mcs15;
 };
 
 #define ATH12K_WMI_FLAG_MLO_ENABLED                    BIT(0)