wlan: Ignore CSA request for invalid channel

In present scenario, STA disconnects with AP if it receives
invalid channel in CSA IE. In this case STA shouldn't
disconnect with AP as this request may come from a spoof AP.

Ignore this CSA request as it might be from spoof AP and
if it is from genuine AP heart beat failure happens and
results in disconnection. After disconnection DUT may
reconnect to same or other APs

Issue: FP3SEC-1083
Change-Id: Iad99e1c8004b5060a2528ce7d4829badd2e0a3e0
CRs-Fixed: 3403638
(cherry picked from commit 92c8726c452cc6c80116afd4cfc6c96f18f55272)
(cherry picked from commit e88da2d39264db444665ab01e4839b63f245fe34)
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index bc51c9c..7bdc05b 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -2691,19 +2691,16 @@
             return;
         }
 
-        /* If the channel-list that AP is asking us to switch is invalid,
-         * then we cannot switch the channel. Just disassociate from AP. 
-         * We will find a better AP !!!
-         */
-        if ((psessionEntry->limMlmState == eLIM_MLM_LINK_ESTABLISHED_STATE) &&
-           (psessionEntry->limSmeState != eLIM_SME_WT_DISASSOC_STATE)&&
-           (psessionEntry->limSmeState != eLIM_SME_WT_DEAUTH_STATE)) {
-              limLog(pMac, LOGE, FL("Invalid channel!! Disconnect.."));
-              limTearDownLinkWithAp(pMac,
-                        pMac->lim.limTimers.gLimChannelSwitchTimer.sessionId,
-                        eSIR_MAC_UNSPEC_FAILURE_REASON);
-        }
-        return;
+	/* The channel switch request received from AP is carrying
+	 * invalid channel. It's ok to ignore this channel switch
+	 * request as it might be from spoof AP. If it's from genuine
+	 * AP, it may lead to heart beat failure and result in
+	 * disconnection. DUT can go ahead and reconnect to it/any
+	 * other AP once it disconnects.
+	 */
+	limLog(pMac, LOGE, FL("Invalid channel %u Ignore CSA request"),
+	       channel);
+	return;
     }
     limCovertChannelScanType(pMac, psessionEntry->currentOperChannel, false);
     pMac->lim.dfschannelList.timeStamp[psessionEntry->currentOperChannel] = 0;