diff options
| author | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-02-02 13:54:31 -0800 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-02-03 16:04:47 +0530 |
| commit | 975ea4e1f00c8b8eacf2eadcb774f18c8dc34b1f (patch) | |
| tree | 0bb25df93322f4504692117657bff58bb9c5e997 | |
| parent | 501982f2027e54ed5d80bb04399d399f6348188e (diff) | |
qcacld: Fix Kernel Panic during driver unload.
Prima to qcacld-2.0 propagation
During driver unload, no protection mechanism
is provided for sme queue. As a result between
sme_stop and sme_close there is a possibility
to queue SME command. As a part of fix, made
sure that no command enters into queue while
unload is in progress.
Change-Id: Ieef5b4a9fb89bb0dd5c3462b80f6ed1c2711632a
CRs-Fixed: 790031
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 5 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 5 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 4968254d8c36..5cc6da9a8b32 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -9369,6 +9369,11 @@ VOS_STATUS hdd_enable_bmps_imps(hdd_context_t *pHddCtx) { VOS_STATUS status = VOS_STATUS_SUCCESS; + if (0 != wlan_hdd_validate_context(pHddCtx)) { + hddLog(LOGE, FL("HDD context is not valid")); + return VOS_STATUS_E_PERM; + } + if(pHddCtx->cfg_ini->fIsBmpsEnabled) { sme_EnablePowerSave(pHddCtx->hHal, ePMC_BEACON_MODE_POWER_SAVE); diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 2a9b656dd1a2..611f93707e7e 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -17663,6 +17663,11 @@ eHalStatus csrQueueSmeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOL { eHalStatus status; + if (!SME_IS_START(pMac)) { + smsLog(pMac, LOGE, FL("Sme in stop state")); + return eHAL_STATUS_FAILURE; + } + if( (eSmeCommandScan == pCommand->command) && pMac->scan.fDropScanCmd ) { smsLog(pMac, LOGW, FL(" drop scan (scan reason %d) command"), diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index a0ca6db58b10..92b996fc6d96 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -465,6 +465,11 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac ) void smePushCommand( tpAniSirGlobal pMac, tSmeCmd *pCmd, tANI_BOOLEAN fHighPriority ) { + if (!SME_IS_START(pMac)) { + smsLog(pMac, LOGE, FL("Sme in stop state")); + return; + } + if ( fHighPriority ) { csrLLInsertHead( &pMac->sme.smeCmdPendingList, &pCmd->Link, LL_ACCESS_LOCK ); |
