diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 8dcd7a21e90d..ea2f1109d395 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -976,6 +976,11 @@ static void mlme_init_sap_protection_cfg(struct wlan_objmgr_psoc *psoc, } #ifdef WLAN_FEATURE_11AX + +#define HE_MCS12_13_24G_INDEX 0 +#define HE_MCS12_13_5G_INDEX 1 +#define HE_MCS12_13_BITS 16 + static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc, struct wlan_mlme_cfg *mlme_cfg) { @@ -1153,8 +1158,16 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_HE_STA_OBSSPD); qdf_mem_zero(he_caps->he_ppet_2g, MLME_HE_PPET_LEN); qdf_mem_zero(he_caps->he_ppet_5g, MLME_HE_PPET_LEN); - mlme_cfg->he_caps.he_mcs_12_13_supp_2g = 0; - mlme_cfg->he_caps.he_mcs_12_13_supp_5g = 0; + + value = cfg_get(psoc, CFG_HE_MCS_12_13_SUPPORT); + /* Get 2.4Ghz and 5Ghz value */ + mlme_cfg->he_caps.he_mcs_12_13_supp_2g = + QDF_GET_BITS(value, HE_MCS12_13_24G_INDEX * HE_MCS12_13_BITS, + HE_MCS12_13_BITS); + mlme_cfg->he_caps.he_mcs_12_13_supp_5g = + QDF_GET_BITS(value, HE_MCS12_13_5G_INDEX * HE_MCS12_13_BITS, + HE_MCS12_13_BITS); + mlme_cfg->he_caps.enable_6g_sec_check = false; } #else diff --git a/components/mlme/dispatcher/inc/cfg_mlme_he_caps.h b/components/mlme/dispatcher/inc/cfg_mlme_he_caps.h index da5d397c6c46..ac584f34470f 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_he_caps.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_he_caps.h @@ -696,7 +696,57 @@ CFG_VALUE_OR_DEFAULT, \ "He Mu Bfee Sts Gt80") - #define CFG_HE_CAPS_ALL \ +/* + * + * he_mcs_12_13_support - Bit mask to enable MCS 12 and 13 support + * @Min: 0x0 + * @Max: 0xffffffff + * @Default: 0xffffffff + * + * This ini is used to set MCS 12 and 13 for 2.4Ghz and 5Ghz. first 16 + * bits(0-15) is for 2.4ghz and next 16 bits is for 5Ghz. Of 16 bits the lower + * 8 bits represent BW less than or equal 80Mhz (<= 80Mhz) and higher 8 bits + * represent BW greater than 80Mhz (> 80Mhz). nth bit in octet represent support + * for nth NSS [n=1:8]. Def value is 0xFFFFFFFF which enable MCS 12 and 13 for + * all NSS and BW. + * + * Bits Band + * BIT[0:15] 2.4Ghz support for MCS 12 and 13, for NSS n[1:8] and BW <= 80Mhz + * first 8 bits should be used (0-7) and for NSS n[1:8] and BW > + * 80 Mhz, next 8 bits (8-15) should be used. + * + * BIT[16:31] 5Ghz support for MCS 12 and 13, for NSS n[1:8] and BW < 80Mhz, + * bits 16-23 should be used and for BW > 80Mhz, next 8 bits + * (24-31) + * + * Some Possible values are as below + * 0 - MCS 12 and 13 disabled for 2.4Ghz and 5Ghz for all nss and + * BW > 80Mz and <= 80Mhz + * 0x3030303 - MCS 12 and 13 enabled for 2.4Ghz and 5Ghz for NSS 1 and 2 for + * BW > 80Mhz and <= 80Mhz + * 0x0303 - MCS 12 and 13 enabled for 2.4Ghz NSS 1 and 2 for BW > 80Mhz and + * <= 80Mhz but disabled for 5Ghz + * 0x3030000 - MCS 12 and 13 enabled for 5Ghz NSS 1 and 2 for BW > 80Mhz and + * <= 80Mhz but disabled for 2.4Ghz + * 0x30000 - MCS 12 and 13 enabled for 5Ghz NSS 1 and 2 for BW <= 80Mhz and + * disabled for BW > 80Mhz. And disabled for 2.4Ghz + * 0x3 MCS 12 and 13 enabled for 2.4Ghz NSS 1 and 2 for BW <= 80Mhz and + * disabled for all + * + * Related: None + * + * Supported Feature: HE MCS 12 and 13 + * + * Usage: Internal + * + * + */ +#define CFG_HE_MCS_12_13_SUPPORT CFG_INI_UINT("he_mcs_12_13_support", \ + 0, 0xffffffff, 0xffffffff, \ + CFG_VALUE_OR_DEFAULT, \ + "He Configure MCS_12_13 bits") + +#define CFG_HE_CAPS_ALL \ CFG(CFG_HE_CONTROL) \ CFG(CFG_HE_TWT_REQUESTOR) \ CFG(CFG_HE_TWT_RESPONDER) \ @@ -788,7 +838,8 @@ CFG(CFG_HE_DYNAMIC_FRAGMENTATION) \ CFG(CFG_ENABLE_UL_MIMO) \ CFG(CFG_ENABLE_UL_OFDMA) \ - CFG(CFG_HE_STA_OBSSPD) + CFG(CFG_HE_STA_OBSSPD) \ + CFG(CFG_HE_MCS_12_13_SUPPORT) #endif /* __CFG_MLME_HE_CAPS_H */ diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 78bd169974d0..ba0447d9dbdd 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -854,10 +854,11 @@ QDF_STATUS mlme_update_tgt_he_caps_in_cfg(struct wlan_objmgr_psoc *psoc, HE_MAX_PPET_SIZE); mlme_obj->cfg.he_caps.he_cap_orig = mlme_obj->cfg.he_caps.dot11_he_cap; - mlme_obj->cfg.he_caps.he_mcs_12_13_supp_2g = - wma_cfg->he_mcs_12_13_supp_2g; - mlme_obj->cfg.he_caps.he_mcs_12_13_supp_5g = - wma_cfg->he_mcs_12_13_supp_5g; + /* Take intersection of host and FW capabilities */ + mlme_obj->cfg.he_caps.he_mcs_12_13_supp_2g &= + wma_cfg->he_mcs_12_13_supp_2g; + mlme_obj->cfg.he_caps.he_mcs_12_13_supp_5g &= + wma_cfg->he_mcs_12_13_supp_5g; return status; }