wlan: Fix Kernel Panic during driver unload.
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: Id1b7bbe69eaca22b404e61f393c1a17b075d0f31
CRs-Fixed: 775944
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 896e6ac..be3b6db 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -17237,6 +17237,13 @@
eHalStatus csrQueueSmeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fHighPriority )
{
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"),