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/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 4495eae..0b85f2b 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -6523,7 +6523,11 @@
 VOS_STATUS hdd_enable_bmps_imps(hdd_context_t *pHddCtx)
 {
    VOS_STATUS status = VOS_STATUS_SUCCESS;
-
+   if (WLAN_HDD_IS_UNLOAD_IN_PROGRESS(pHddCtx))
+   {
+       hddLog( LOGE, FL("Wlan Unload in progress"));
+       return VOS_STATUS_E_PERM;
+   }
    if(pHddCtx->cfg_ini->fIsBmpsEnabled)
    {
       sme_EnablePowerSave(pHddCtx->hHal, ePMC_BEACON_MODE_POWER_SAVE);