From 7ae88fbc8a933c31f2a8d18e0773187c36a6a0e1 Mon Sep 17 00:00:00 2001 From: Ajit Pal Singh Date: Wed, 6 Sep 2017 16:14:35 +0530 Subject: [PATCH] qcacld-3.0: Ignore CSA, if new channel not ok for DNBS When Do_Not_Switch_Channel is set on an AP interface participating in AP+STA SCC and CSA event is received on the STA interface, reject the new CSA channel if it is not OK for DNBS. Change-Id: I51c35ba2f1f3eccf4f5d58cb802e3dca50b17227 CRs-Fixed: 2105090 --- core/mac/src/pe/lim/lim_utils.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index d76b2584bd6da..4cf405e299139 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -59,6 +59,7 @@ #include "nan_datapath.h" #include "wma.h" #include "wlan_reg_services_api.h" +#include "wlan_policy_mgr_api.h" #ifdef WLAN_FEATURE_11AX_BSS_COLOR #include "wma_he.h" #endif @@ -5047,6 +5048,17 @@ 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; + + if (policy_mgr_is_chan_ok_for_dnbs(pMac->psoc, channel, &ok)) { + pe_err("policy_mgr_is_chan_ok_for_dnbs() returned error"); + return false; + } + + if (!ok) { + pe_debug("channel not ok for DNBS"); + return false; + } if (wlan_cfg_get_str(pMac, WNI_CFG_VALID_CHANNEL_LIST, (uint8_t *) validChannelList,