qcacld-3.0: Add maximum sta number limitation for each pe_session
Currently use maxStation to create dph_hash_table for each pe_session, actually maxStation is total allowed maximum sta for all pe_session that gets from ini gSoftApMaxPeers and firmware capability. SIR_SAP_MAX_NUM_PEERS is maximum sta number for each pe_session and can be configured from config file, add max_sta_of_pe_session to limit maximum sta number for each pe_session, set max_sta_of_pe_session as minimum value between maxStation and SIR_SAP_MAX_NUM_PEERS. Change-Id: Iaa01c91cd164c470b3f76bffc826ca5abdd4d0d3 CRs-Fixed: 2676484
This commit is contained in:
parent
653f2d1dbb
commit
03c1b12671
@ -624,6 +624,7 @@ typedef struct sAniSirLim {
|
||||
/* wsc info required to form the wsc IE */
|
||||
tLimWscIeInfo wscIeInfo;
|
||||
struct pe_session *gpSession; /* Pointer to session table */
|
||||
uint8_t max_sta_of_pe_session;
|
||||
|
||||
qdf_mutex_t lim_frame_register_lock;
|
||||
qdf_list_t gLimMgmtFrameRegistratinQueue;
|
||||
|
@ -53,7 +53,7 @@
|
||||
void lim_init_peer_idxpool(struct mac_context *mac, struct pe_session *pe_session)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t maxAssocSta = mac->lim.maxStation;
|
||||
uint8_t maxAssocSta = mac->lim.max_sta_of_pe_session;
|
||||
|
||||
pe_session->gpLimPeerIdxpool[0] = 0;
|
||||
|
||||
|
@ -798,6 +798,9 @@ QDF_STATUS pe_open(struct mac_context *mac, struct cds_config_info *cds_cfg)
|
||||
|
||||
mac->lim.maxBssId = cds_cfg->max_bssid;
|
||||
mac->lim.maxStation = cds_cfg->max_station;
|
||||
mac->lim.max_sta_of_pe_session =
|
||||
(cds_cfg->max_station > SIR_SAP_MAX_NUM_PEERS) ?
|
||||
SIR_SAP_MAX_NUM_PEERS : cds_cfg->max_station;
|
||||
qdf_spinlock_create(&mac->sys.bbt_mgmt_lock);
|
||||
|
||||
if ((mac->lim.maxBssId == 0) || (mac->lim.maxStation == 0)) {
|
||||
@ -2437,7 +2440,8 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
|
||||
}
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
ft_session_ptr = pe_create_session(mac_ctx, bss_desc->bssId,
|
||||
&session_id, mac_ctx->lim.maxStation,
|
||||
&session_id,
|
||||
mac_ctx->lim.max_sta_of_pe_session,
|
||||
session_ptr->bssType,
|
||||
session_ptr->vdev_id,
|
||||
session_ptr->opmode);
|
||||
@ -2792,7 +2796,7 @@ void lim_mon_init_session(struct mac_context *mac_ptr,
|
||||
|
||||
psession_entry = pe_create_session(mac_ptr, msg->bss_id.bytes,
|
||||
&session_id,
|
||||
mac_ptr->lim.maxStation,
|
||||
mac_ptr->lim.max_sta_of_pe_session,
|
||||
eSIR_MONITOR_MODE,
|
||||
msg->vdev_id,
|
||||
QDF_MONITOR_MODE);
|
||||
|
@ -439,7 +439,8 @@ void lim_handle_ft_pre_auth_rsp(struct mac_context *mac, QDF_STATUS status,
|
||||
pe_session->ftPEContext.pFTPreAuthReq->pbssDescription;
|
||||
ft_session =
|
||||
pe_create_session(mac, pbssDescription->bssId,
|
||||
&sessionId, mac->lim.maxStation,
|
||||
&sessionId,
|
||||
mac->lim.max_sta_of_pe_session,
|
||||
pe_session->bssType,
|
||||
pe_session->vdev_id,
|
||||
pe_session->opmode);
|
||||
|
@ -585,7 +585,8 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
||||
} else {
|
||||
session = pe_create_session(mac_ctx,
|
||||
sme_start_bss_req->bssid.bytes,
|
||||
&session_id, mac_ctx->lim.maxStation,
|
||||
&session_id,
|
||||
mac_ctx->lim.max_sta_of_pe_session,
|
||||
sme_start_bss_req->bssType,
|
||||
sme_start_bss_req->vdev_id,
|
||||
sme_start_bss_req->bssPersona);
|
||||
@ -1233,7 +1234,8 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
||||
* Try to Create a new session
|
||||
*/
|
||||
session = pe_create_session(mac_ctx, bss_desc->bssId,
|
||||
&session_id, mac_ctx->lim.maxStation,
|
||||
&session_id,
|
||||
mac_ctx->lim.max_sta_of_pe_session,
|
||||
eSIR_INFRASTRUCTURE_MODE,
|
||||
sme_join_req->vdev_id,
|
||||
sme_join_req->staPersona);
|
||||
@ -5245,7 +5247,7 @@ void send_extended_chan_switch_action_frame(struct mac_context *mac_ctx,
|
||||
switch_count = session_entry->gLimChannelSwitch.switchCount;
|
||||
|
||||
if (LIM_IS_AP_ROLE(session_entry)) {
|
||||
for (i = 0; i <= mac_ctx->lim.maxStation; i++) {
|
||||
for (i = 0; i <= mac_ctx->lim.max_sta_of_pe_session; i++) {
|
||||
psta =
|
||||
session_entry->dph.dphHashTable.pDphNodeArray + i;
|
||||
if (psta && psta->added)
|
||||
@ -5289,7 +5291,7 @@ void lim_send_chan_switch_action_frame(struct mac_context *mac_ctx,
|
||||
switch_count = session_entry->gLimChannelSwitch.switchCount;
|
||||
|
||||
if (LIM_IS_AP_ROLE(session_entry)) {
|
||||
for (i = 0; i < mac_ctx->lim.maxStation; i++) {
|
||||
for (i = 0; i <= mac_ctx->lim.max_sta_of_pe_session; i++) {
|
||||
psta = dph_node_array_ptr + i;
|
||||
if (!(psta && psta->added))
|
||||
continue;
|
||||
|
@ -210,7 +210,7 @@ static void pe_reset_protection_callback(void *ptr)
|
||||
|
||||
qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
|
||||
/* index 0, is self node, peers start from 1 */
|
||||
for (i = 1 ; i <= mac_ctx->mlme_cfg->sap_cfg.assoc_sta_limit ; i++) {
|
||||
for (i = 1 ; i <= mac_ctx->lim.max_sta_of_pe_session; i++) {
|
||||
station_hash_node = dph_get_hash_entry(mac_ctx, i,
|
||||
&pe_session_entry->dph.dphHashTable);
|
||||
if (!station_hash_node)
|
||||
|
@ -5767,8 +5767,8 @@ void lim_del_pmf_sa_query_timer(struct mac_context *mac_ctx, struct pe_session *
|
||||
tpDphHashNode sta_ds = NULL;
|
||||
|
||||
for (associated_sta = 1;
|
||||
associated_sta <
|
||||
mac_ctx->mlme_cfg->sap_cfg.assoc_sta_limit;
|
||||
associated_sta <=
|
||||
mac_ctx->lim.max_sta_of_pe_session;
|
||||
associated_sta++) {
|
||||
sta_ds = dph_get_hash_entry(mac_ctx, associated_sta,
|
||||
&pe_session->dph.dphHashTable);
|
||||
|
Loading…
Reference in New Issue
Block a user