wlan: Block scan when CSA is in progress

If Scan starts when CSA timer is running, CSA will fail and STA
will disconnect from AP.

To avoid this block SCAN till CSA is in progress.

Change-Id: Id4648d05ce0f732b0961b97ac2c088c78997cfda
CRs-Fixed: 2165381
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index e28e048..a4bb404 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -58,6 +58,7 @@
 #include "limSendMessages.h"
 #include "limApi.h"
 #include "wmmApsd.h"
+#include "limSessionUtils.h"
 
 #ifdef WLAN_FEATURE_RMC
 #include "limRMC.h"
@@ -1260,11 +1261,12 @@
     sirCopyMacAddr(pMac->lim.gSelfMacAddr,  pScanReq->selfMacAddr);
 
    /* Check if scan req is not valid or link is already suspended*/
-    if (!limIsSmeScanReqValid(pMac, pScanReq) || limIsLinkSuspended(pMac))
+    if (!limIsSmeScanReqValid(pMac, pScanReq) ||
+        limIsLinkSuspended(pMac) || limIsChanSwitchRunning(pMac))
     {
         limLog(pMac, LOGE,
-         FL("Received SME_SCAN_REQ with invalid params or link is suspended %d"),
-          limIsLinkSuspended(pMac));
+         FL("Received SME_SCAN_REQ with invalid params or link is suspended %d limIsChanSwitchRunning %d"),
+          limIsLinkSuspended(pMac), limIsChanSwitchRunning(pMac));
 
         if (pMac->lim.gLimRspReqd)
         {