Explorar el Código

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
Ajit Pal Singh hace 7 años
padre
commit
7ae88fbc8a
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      core/mac/src/pe/lim/lim_utils.c

+ 12 - 0
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,