From 1fe8a4759bc42c2dd160b73521b408a2a5bda283 Mon Sep 17 00:00:00 2001 From: bings Date: Thu, 13 Apr 2017 03:37:08 +0800 Subject: [PATCH] qcacld-3.0: Restore pMac->sap.sapCtxList in start_ap context qcacld-2.0 to qcacld-3.0 propagation sap_OpenSession is called in add_virtual_intf context, while sap_CloseSession is called in stop_ap context. Sap can't start successfully in dfs channel if hostapd is killed and restarted, because sap_CloseSession clears pMac->sap.sapCtxList. Restored pMac->sap.sapCtxList in start_ap context. CRs-Fixed: 2032512 Change-Id: Ief31b4994ad74159795619f3d4f13891f28585de --- core/sap/src/sap_module.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 305222ae49e5..9cb8aab31f62 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -958,6 +958,11 @@ QDF_STATUS wlansap_start_bss(void *pCtx, /* pwextCtx */ */ pmac->sap.SapDfsInfo.disable_dfs_ch_switch = pConfig->disableDFSChSwitch; + pmac->sap.sapCtxList[pSapCtx->sessionId].pSapContext = pSapCtx; + pmac->sap.sapCtxList[pSapCtx->sessionId].sapPersona = + pSapCtx->csr_roamProfile.csrPersona; + pmac->sap.sapCtxList[pSapCtx->sessionId].sessionID = + pSapCtx->sessionId; /* Copy MAC filtering settings to sap context */ pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;