mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Clear mac_ctx->sap.sapCtxList for SAP if SSR happen
While SSR happen, hdd_reset_all_adapters will not clear mac_ctx->sap.sapCtxList[sapctx->sessionId].pSapContext, and later the sapctx will assign new sessionId after SSR restart SAP and update to mac_ctx->sap.sapCtxList. So sapctx/old sessionId still can be referenced by like wlan_sap_is_pre_cac_active and call pre cac cleanup on unexpected port. When SAP restart and set global sapCtxList in sap_set_session_param(), find matched sapctx and clear it before assigning updated value. Change-Id: Id02733cb22267ac0c1899d8caf9ac47c65e24a88 CRs-Fixed: 2232398
This commit is contained in:
parent
0e6f44655a
commit
9913277e97
1 changed files with 7 additions and 0 deletions
|
|
@ -1200,11 +1200,18 @@ QDF_STATUS sap_set_session_param(tHalHandle hal, struct sap_context *sapctx,
|
|||
uint32_t session_id)
|
||||
{
|
||||
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
|
||||
int i;
|
||||
|
||||
sapctx->sessionId = session_id;
|
||||
sapctx->is_pre_cac_on = false;
|
||||
sapctx->pre_cac_complete = false;
|
||||
sapctx->chan_before_pre_cac = 0;
|
||||
|
||||
/* When SSR, SAP will restart, clear the old context,sessionId */
|
||||
for (i = 0; i < SAP_MAX_NUM_SESSION; i++) {
|
||||
if (mac_ctx->sap.sapCtxList[i].pSapContext == sapctx)
|
||||
mac_ctx->sap.sapCtxList[i].pSapContext = NULL;
|
||||
}
|
||||
mac_ctx->sap.sapCtxList[sapctx->sessionId].sessionID =
|
||||
sapctx->sessionId;
|
||||
mac_ctx->sap.sapCtxList[sapctx->sessionId].pSapContext = sapctx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue