wlan: Change the behavior of isLoadUnloadInProgres

Some APIs (wlan_hdd_linux_reg_notifier) can be allowed to execute if
driver load is in progress but should be blocked if driver unload is in
progress, to be able to cater to the needs of such APIs change
isLoadUnloadInProgress so that it can distinguish between driver load
and unload.

Change-Id: I80d42a2b1cc2e161c5405bcc8440f3fb02c6d4a7
CRs-Fixed: 629537
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 8a40e70..15f8df5 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -533,6 +533,13 @@
    WLAN_HDD_TM_LEVEL_MAX
 } WLAN_TmLevelEnumType;
 
+typedef enum
+{
+   WLAN_HDD_NO_LOAD_UNLOAD_IN_PROGRESS = 0 ,
+   WLAN_HDD_LOAD_IN_PROGRESS           = 1<<0,
+   WLAN_HDD_UNLOAD_IN_PROGRESS         = 1<<1,
+}load_unload_sequence;
+
 /* Driver Action based on thermal mitigation level structure */
 typedef struct
 {
@@ -1139,7 +1146,7 @@
 
    struct completion ssr_comp_var;
 
-   v_BOOL_t isLoadUnloadInProgress;
+   v_U8_t isLoadUnloadInProgress;
    
    /**Track whether driver has been suspended.*/
    hdd_ps_state_t hdd_ps_state;
@@ -1268,7 +1275,15 @@
 };
 
 
+#define WLAN_HDD_IS_LOAD_IN_PROGRESS(pHddCtx)  \
+            (pHddCtx->isLoadUnloadInProgress & WLAN_HDD_LOAD_IN_PROGRESS)
 
+#define WLAN_HDD_IS_UNLOAD_IN_PROGRESS(pHddCtx)  \
+            (pHddCtx->isLoadUnloadInProgress & WLAN_HDD_UNLOAD_IN_PROGRESS)
+
+#define WLAN_HDD_IS_LOAD_UNLOAD_IN_PROGRESS(pHddCtx)  \
+            (pHddCtx->isLoadUnloadInProgress &    \
+              (WLAN_HDD_UNLOAD_IN_PROGRESS | WLAN_HDD_UNLOAD_IN_PROGRESS))
 /*--------------------------------------------------------------------------- 
   Function declarations and documenation
   -------------------------------------------------------------------------*/