wlan: HDD: add logpinprogress check for ioctl calls

Add logpinprogress check to prevent powerstate
change during loading through wlan_hdd_enter_bmps.
This helps to prevent access to any uninitialized null pointer
during loading stage of driver.

CRs-fixed: 637285
Change-Id: I196c42bd1f7b3791a1825ac9250aff60556569d0
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 33f9465..a0073e2 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -2816,6 +2816,12 @@
 
    hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "power mode=%d", mode);
    pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+   if (pHddCtx->isLogpInProgress) {
+      VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+                "%s:LOGP in Progress. Ignore!!!", __func__);
+      return VOS_STATUS_E_FAILURE;
+   }
+
    init_completion(&context.completion);
 
    context.pAdapter = pAdapter;