qcacld-3.0: Modify logic to associate with HT clients

Add the following rules when HT client is associating with SAP,
1.2G-AS platform: SAP associates with HT (11n) clients as 2x1 in 2G
and 2X2 in 5G.
2.Non-2G-AS platform: SAP associates with HT (11n) clients as 2X2
in 2G and 5G and async DBS scan is disabled.
3.5G-AS platform: SAP associates with HT (11n) clients as 2X2 in 2G
and 5G and async DBS scan is disabled.

Change-Id: Ia472e786cf3ffcb420aa8142a543b56f508c6b4a
CRs-Fixed: 2063482
This commit is contained in:
Tushnim Bhattacharyya 2017-06-19 11:13:43 -07:00 • committed by snandini
commit 3d17def041
4 changed files with 56 additions and 2 deletions

View file

@ -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;
/*-------------------------------------------------------------------------

View file

@ -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 */

View file

@ -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 &&

View file

@ -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];
}