diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index cbcbe66a97..fb8d00a38d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8242,16 +8242,25 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt) } found = false; - for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) { - if (adapter->session.ap.operating_channel == - hdd_ctxt->unsafe_channel_list[i]) { - found = true; - hdd_debug("operating ch:%d is unsafe", - adapter->session.ap.operating_channel); - break; + /* + * If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan + * is set, no need to move SAP. + */ + if (policy_mgr_is_sta_sap_scc(hdd_ctxt->hdd_psoc, + adapter->session.ap.operating_channel) && + hdd_ctxt->config->sta_sap_scc_on_lte_coex_chan) + hdd_debug("SAP is allowed on SCC channel, no need to move SAP"); + else { + for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) { + if (adapter->session.ap.operating_channel == + hdd_ctxt->unsafe_channel_list[i]) { + found = true; + hdd_debug("operating ch:%d is unsafe", + adapter->session.ap.operating_channel); + break; + } } } - if (!found) { hdd_debug("ch:%d is safe. no need to change channel", adapter->session.ap.operating_channel);