Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcd0add4 authored by Aravind Kishore Sukla's avatar Aravind Kishore Sukla Committed by Fairphone ODM
Browse files

qcacld-3.0: 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.

Change-Id: I840508dd27d8c313a3e8f74c4e1f5aa64eecf6f9
CRs-Fixed: 3390251
(cherry picked from commit 94f00ff17969b131f14b078b901148b43d825f20)
(cherry picked from commit f011580dc498b537309206a90d8c9848727871c2)
parent 5c362369
Loading
Loading
Loading
Loading
+9 −15
Original line number Original line Diff line number Diff line
@@ -1934,23 +1934,17 @@ static void __lim_process_channel_switch_timeout(struct pe_session *pe_session)
		}
		}


		/*
		/*
		 * If the channel-list that AP is asking us to switch is invalid
		 * The channel switch request received from AP is carrying
		 * then we cannot switch the channel. Just disassociate from AP.
		 * invalid channel. It's ok to ignore this channel switch
		 * We will find a better AP !!!
		 * request as it might be from spoof AP. If it's from genuine
		 */
		 * AP, it may lead to heart beat failure and result in
		if ((pe_session->limMlmState ==
		 * disconnection. DUT can go ahead and reconnect to it/any
		   eLIM_MLM_LINK_ESTABLISHED_STATE) &&
		 * other AP once it disconnects.
		   (pe_session->limSmeState != eLIM_SME_WT_DISASSOC_STATE) &&
		 */
		   (pe_session->limSmeState != eLIM_SME_WT_DEAUTH_STATE)) {
		pe_err("Invalid channel freq %u Ignore CSA request",
			pe_err("Invalid channel! Disconnect");
		       channel_freq);
			lim_tear_down_link_with_ap(mac,
					   mac->lim.lim_timers.
					   gLimChannelSwitchTimer.sessionId,
					   eSIR_MAC_UNSUPPORTED_CHANNEL_CSA,
					   eLIM_LINK_MONITORING_DISASSOC);
		return;
		return;
	}
	}
	}
	switch (pe_session->gLimChannelSwitch.state) {
	switch (pe_session->gLimChannelSwitch.state) {
	case eLIM_CHANNEL_SWITCH_PRIMARY_ONLY:
	case eLIM_CHANNEL_SWITCH_PRIMARY_ONLY:
		lim_switch_primary_channel(mac,
		lim_switch_primary_channel(mac,