From 867d411eea5dffc62419afaa682b953e769382ef Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Fri, 8 Jun 2018 12:53:31 +0530 Subject: [PATCH] qcacld-3.0: Ignore CSA if the channel is DFS or disabled If MCC to SCC switch is enabled, SAP is active and CSA received for STA interface, then ignore the CSA if channel is DFS/disabled. CRs-Fixed: 2266838 Change-Id: I98b8d957766358ea86cc9f50339725cf4bf0038b --- core/mac/src/pe/lim/lim_utils.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 34829f7d629e..6f85f3eb125f 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -4948,7 +4948,7 @@ bool lim_is_channel_valid_for_channel_switch(tpAniSirGlobal pMac, uint8_t channe uint8_t index; uint32_t validChannelListLen = WNI_CFG_VALID_CHANNEL_LIST_LEN; tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; - bool ok; + bool ok = false; if (policy_mgr_is_chan_ok_for_dnbs(pMac->psoc, channel, &ok)) { pe_err("policy_mgr_is_chan_ok_for_dnbs() returned error"); @@ -4969,8 +4969,12 @@ bool lim_is_channel_valid_for_channel_switch(tpAniSirGlobal pMac, uint8_t channe } for (index = 0; index < validChannelListLen; index++) { - if (validChannelList[index] == channel) - return true; + if (validChannelList[index] != channel) + continue; + + ok = policy_mgr_is_valid_for_channel_switch(pMac->psoc, + channel); + return ok; } /* channel does not belong to list of valid channels */