Преглед изворни кода

qcacld-3.0: Update Association Id from pe_session

Issue is: Invalid pointer access (unmapped address) in
gpLimCnfWaitTimer deactivate due to invalid assoc Id.

With change If62a6082f073ce4f7084a48a4f8e60407ddfeec8,
Host directly updates the sta_ds->assocId as
assoc id given by ap in assoc request. As this is
related to the way  host store the peer in internal
data structure, In case if value of assoc id coming
from AP is greater than the array size of CNF_WAIT
timer.

Fixes are:
1. Remove changes introduced by the commit:
   If62a6082f073ce4f7084a48a4f8e60407ddfeec8
2. Update Association Identifier from pe_session
   for STA.

Change-Id: Ib0c9facb70c459b7ca62454f2e92b33f51443f01
CRs-Fixed: 3274812
abhinav kumar пре 2 година
родитељ
комит
ca7969c1c2

+ 4 - 1
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3706,7 +3706,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 	listen_interval = mac->mlme_cfg->sap_cfg.listen_interval;
 	pAddBssParams->staContext.listenInterval = listen_interval;
 
-	/* Fill Assoc id from the dph table */
+	/* Get STA hash entry from the dph table */
 	sta = dph_lookup_hash_entry(mac, pAddBssParams->staContext.bssId,
 				&pAddBssParams->staContext.assocId,
 				&pe_session->dph.dphHashTable);
@@ -3719,6 +3719,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 			return QDF_STATUS_E_FAILURE;
 	}
 
+	/* Update Assoc id from pe_session for STA */
+	pAddBssParams->staContext.assocId = pe_session->limAID;
+
 	pAddBssParams->staContext.uAPSD =
 		pe_session->gUapsdPerAcBitmask;
 

+ 0 - 1
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -153,7 +153,6 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
 	sta_ds->mlmStaContext.authType = session_entry->limCurrentAuthType;
 
 	/* Add capabilities information, rates and AID */
-	sta_ds->assocId = assoc_rsp->aid & 0x3FFF;
 	sta_ds->mlmStaContext.capabilityInfo = assoc_rsp->capabilityInfo;
 	sta_ds->shortPreambleEnabled =
 		(uint8_t) assoc_rsp->capabilityInfo.shortPreamble;