wlan: Wait uninterrupted for sysStop to complete

During driver load on failure condition, sysStop is invoked which
queues a command to stop MAC which eventually cleans up timers.
After queueing of command sysStop waits for completion indication
with interruptible status, which is getting interrupted with
ERESTARTSYS leaving the gLimSendDisassocFrameThresholdTimer
in active state, this is causing timer to be triggered after
driver fails to load causing the crash.

Wait for the completion indication with Uninterruptable state.

Change-Id: Iba05cf4e035c24cf5278f08461520c0d45ad87d1
CRs-Fixed: 638025
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 3bfafd8..618e8c9 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -5517,7 +5517,7 @@
    }
    
    //Block on a completion variable. Can't wait forever though.
-   rc = wait_for_completion_interruptible_timeout(
+   rc = wait_for_completion_timeout(
                         &pAdapter->session_open_comp_var,
                         msecs_to_jiffies(WLAN_WAIT_TIME_SESSIONOPENCLOSE));
    if (rc <= 0)
diff --git a/CORE/SYS/common/src/wlan_qct_sys.c b/CORE/SYS/common/src/wlan_qct_sys.c
index d5f3afa..88fef21 100644
--- a/CORE/SYS/common/src/wlan_qct_sys.c
+++ b/CORE/SYS/common/src/wlan_qct_sys.c
@@ -100,7 +100,8 @@
 
 } sysContextData;
 
-
+// sysStop 20 Seconds timeout
+#define SYS_STOP_TIMEOUT 20000
 static vos_event_t gStopEvt;
 
 VOS_STATUS sysBuildMessageHeader( SYS_MSG_ID sysMsgId, vos_msg_t *pMsg )
@@ -163,7 +164,7 @@
       vosStatus = VOS_STATUS_E_BADMSG;
    }
 
-   vosStatus = vos_wait_events( &gStopEvt, 1, 0, &evtIndex );
+   vosStatus = vos_wait_events( &gStopEvt, 1, SYS_STOP_TIMEOUT, &evtIndex );
    VOS_ASSERT( VOS_IS_STATUS_SUCCESS ( vosStatus ) );
 
    vosStatus = vos_event_destroy( &gStopEvt );