diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 5cf84458ac62..3f9cec2d56b1 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -515,6 +515,7 @@ typedef struct sPESession /* Added to Support BT-AMP */ #endif #endif bool enable_bcast_probe_rsp; + uint8_t ht_client_cnt; } tPESession, *tpPESession; /*------------------------------------------------------------------------- diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 52c6f2e0f441..684770ed9aaf 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2169,6 +2169,29 @@ lim_add_sta(tpAniSirGlobal mac_ctx, add_sta_params->vhtCapable = sta_ds->mlmStaContext.vhtCapability; } + /* + * 2G-AS platform: SAP associates with HT (11n)clients as 2x1 in 2G and + * 2X2 in 5G + * Non-2G-AS platform: SAP associates with HT (11n) clients as 2X2 in 2G + * and 5G; and disable async dbs scan when HT client connects + * 5G-AS: Don't care + */ + if (!policy_mgr_is_hw_dbs_2x2_capable(mac_ctx->psoc) && + LIM_IS_AP_ROLE(session_entry) && + (STA_ENTRY_PEER == sta_ds->staType) && + !add_sta_params->vhtCapable && + (session_entry->nss == 2)) { + session_entry->ht_client_cnt++; + if ((session_entry->ht_client_cnt == 1) && + !(mac_ctx->lteCoexAntShare && + IS_24G_CH(session_entry->currentOperChannel))) { + pe_debug("setting SMPS intolrent vdev_param"); + wma_cli_set_command(session_entry->smeSessionId, + (int)WMI_VDEV_PARAM_SMPS_INTOLERANT, + 1, VDEV_CMD); + } + } + #ifdef FEATURE_WLAN_TDLS /* SystemRole shouldn't be matter if staType is TDLS peer */ else if (STA_ENTRY_TDLS_PEER == sta_ds->staType) { @@ -2496,6 +2519,26 @@ lim_del_sta(tpAniSirGlobal pMac, return eSIR_MEM_ALLOC_FAILED; } + /* + * 2G-AS platform: SAP associates with HT (11n)clients as 2x1 in 2G and + * 2X2 in 5G + * Non-2G-AS platform: SAP associates with HT (11n) clients as 2X2 in 2G + * and 5G; and enable async dbs scan when all HT clients are gone + * 5G-AS: Don't care + */ + if (!policy_mgr_is_hw_dbs_2x2_capable(pMac->psoc) && + LIM_IS_AP_ROLE(psessionEntry) && + (pStaDs->staType == STA_ENTRY_PEER) && + !pStaDs->mlmStaContext.vhtCapability && + (psessionEntry->nss == 2)) { + psessionEntry->ht_client_cnt--; + if (psessionEntry->ht_client_cnt == 0) { + pe_debug("clearing SMPS intolrent vdev_param"); + wma_cli_set_command(psessionEntry->smeSessionId, + (int)WMI_VDEV_PARAM_SMPS_INTOLERANT, + 0, VDEV_CMD); + } + } /* */ /* DPH contains the STA index only for "peer" STA entries. */ /* LIM global contains "self" STA index */ diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 4f6706934edb..a4a64dbe646d 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1236,8 +1236,17 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, &frm.VHTOperation); is_vht = true; } else { - /* Advertise 1x1 if either is HT-STA */ - if (frm.HTCaps.present && mac_ctx->hw_dbs_capable) + /* + * 2G-AS platform: SAP associates with HT (11n)clients + * as 2x1 in 2G and 2X2 in 5G + * Non-2G-AS platform: SAP associates with HT (11n) + * clients as 2X2 in 2G and 5G + * 5G-AS: Don’t care + */ + if (!policy_mgr_is_hw_dbs_2x2_capable(mac_ctx->psoc) && + frm.HTCaps.present && mac_ctx->hw_dbs_capable && + mac_ctx->lteCoexAntShare && + IS_24G_CH(pe_session->currentOperChannel)) frm.HTCaps.supportedMCSSet[1] = 0; } if (pe_session->vhtCapability && diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index be349397cafe..2220be250ecc 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -455,6 +455,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, pe_err("cannot create or start protectionFieldsResetTimer"); } pe_init_pmf_comeback_timer(pMac, session_ptr, *sessionId); + session_ptr->ht_client_cnt = 0; return &pMac->lim.gpSession[i]; }