diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 396be5e93408..07cb7040eb26 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -4546,6 +4546,36 @@ enum hdd_link_speed_rpt_type { #define CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX (1) #define CFG_VHT_ENABLE_2x2_CAP_FEATURE_DEFAULT (0) +/* + * + * disable_high_ht_mcs_2x2 - disable high mcs index for 2nd stream in 2.4G + * @Min: 0 + * @Max: 8 + * @Default: 0 + * + * This ini is used to disable high HT MCS index for 2.4G STA connection. + * It has been introduced to resolve IOT issue with one of the vendor. + * + * Note: This INI is not useful with 1x1 setting. If some platform supports + * only 1x1 then this INI is not useful. + * + * 0 - It won't disable any HT MCS index (just like normal HT MCS) + * 1 - It will disable 15th bit from HT RX MCS set (from 8-15 bits slot) + * 2 - It will disable 14th & 15th bits from HT RX MCS set + * 3 - It will disable 13th, 14th, & 15th bits from HT RX MCS set + * and so on. + * + * Related: STA + * + * Supported Feature: 11n + * + * Usage: External + */ +#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2 "disable_high_ht_mcs_2x2" +#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MIN (0) +#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MAX (8) +#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2_DEFAULT (0) + /* * * gStaPrefer80MHzOver160MHz - set Sta perferance to connect in 80HZ/160HZ @@ -11419,6 +11449,7 @@ struct hdd_config { bool enable_su_tx_bformer; uint8_t vhtRxMCS2x2; uint8_t vhtTxMCS2x2; + uint8_t disable_high_ht_mcs_2x2; bool enable2x2; uint32_t vdev_type_nss_2g; uint32_t vdev_type_nss_5g; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 9e8e2606af70..71b83b95c21f 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -2040,6 +2040,13 @@ struct reg_table_entry g_registry_table[] = { CFG_VHT_ENABLE_2x2_CAP_FEATURE_MIN, CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX), + REG_VARIABLE(CFG_DISABLE_HIGH_HT_RX_MCS_2x2, WLAN_PARAM_Integer, + struct hdd_config, disable_high_ht_mcs_2x2, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_DISABLE_HIGH_HT_RX_MCS_2x2_DEFAULT, + CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MIN, + CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MAX), + REG_VARIABLE(CFG_VDEV_TYPE_NSS_2G, WLAN_PARAM_Integer, struct hdd_config, vdev_type_nss_2g, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -7674,6 +7681,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) smeConfig->csrConfig.enable_tx_ldpc = pConfig->enable_tx_ldpc; smeConfig->csrConfig.enable_rx_ldpc = pConfig->enable_rx_ldpc; + smeConfig->csrConfig.disable_high_ht_mcs_2x2 = + pConfig->disable_high_ht_mcs_2x2; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode; #endif diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index ef44f908f963..27d857cf6f0a 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -608,6 +608,7 @@ populate_dot11f_ht_caps(tpAniSirGlobal pMac, uint8_t nCfgValue8; tSirRetStatus nSirStatus; tSirMacHTParametersInfo *pHTParametersInfo; + uint8_t disable_high_ht_mcs_2x2 = 0; union { uint16_t nCfgValue16; tSirMacHTCapabilityInfo htCapInfo; @@ -676,6 +677,11 @@ populate_dot11f_ht_caps(tpAniSirGlobal pMac, SIZE_OF_SUPPORTED_MCS_SET); if (psessionEntry) { + disable_high_ht_mcs_2x2 = + pMac->roam.configParam.disable_high_ht_mcs_2x2; + pe_debug("disable HT high MCS INI param[%d]", + disable_high_ht_mcs_2x2); + if (pMac->lteCoexAntShare && (IS_24G_CH(psessionEntry->currentOperChannel))) { if (!(IS_2X2_CHAIN(psessionEntry->chainMask))) { @@ -686,8 +692,17 @@ populate_dot11f_ht_caps(tpAniSirGlobal pMac, } } } - if (psessionEntry->nss == NSS_1x1_MODE) + if (psessionEntry->nss == NSS_1x1_MODE) { pDot11f->supportedMCSSet[1] = 0; + } else if (IS_24G_CH(psessionEntry->currentOperChannel) && + disable_high_ht_mcs_2x2 && + (psessionEntry->pePersona == QDF_STA_MODE)) { + pe_debug("Disabling high HT MCS [%d]", + disable_high_ht_mcs_2x2); + pDot11f->supportedMCSSet[1] = + (pDot11f->supportedMCSSet[1] >> + disable_high_ht_mcs_2x2); + } } /* If STA mode, session supported NSS > 1 and diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index ea9634f35d2c..0142c6a5ae70 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1246,6 +1246,7 @@ typedef struct tagCsrConfigParam { uint8_t scanCfgAgingTime; uint8_t enable_tx_ldpc; uint8_t enable_rx_ldpc; + uint8_t disable_high_ht_mcs_2x2; uint8_t max_amsdu_num; uint8_t nSelect5GHzMargin; uint8_t isCoalesingInIBSSAllowed; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 3f77521025dd..740472357961 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -565,6 +565,7 @@ typedef struct tagCsrConfig { bool send_smps_action; uint8_t tx_ldpc_enable; uint8_t rx_ldpc_enable; + uint8_t disable_high_ht_mcs_2x2; /* * Enable/Disable heartbeat offload */ diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 755790ff6fc1..6111a568c0d2 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2689,6 +2689,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pParam->send_smps_action; pMac->roam.configParam.tx_ldpc_enable = pParam->enable_tx_ldpc; pMac->roam.configParam.rx_ldpc_enable = pParam->enable_rx_ldpc; + pMac->roam.configParam.disable_high_ht_mcs_2x2 = + pParam->disable_high_ht_mcs_2x2; pMac->roam.configParam.ignore_peer_erp_info = pParam->ignore_peer_erp_info; pMac->roam.configParam.max_amsdu_num = @@ -2953,6 +2955,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) #endif pParam->enable_tx_ldpc = cfg_params->tx_ldpc_enable; pParam->enable_rx_ldpc = cfg_params->rx_ldpc_enable; + pParam->disable_high_ht_mcs_2x2 = cfg_params->disable_high_ht_mcs_2x2; pParam->max_amsdu_num = cfg_params->max_amsdu_num; pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin; pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed;