From d2e085d002827e09e2b45c942040761855bd6446 Mon Sep 17 00:00:00 2001 From: Tushnim Bhattacharyya Date: Mon, 18 Jun 2018 11:58:50 -0700 Subject: [PATCH] qcacld-3.0: Don't move SAP if SCC on lte coex channel is allowed If STA+SAP is doing SCC & g_sta_sap_scc_on_lte_coex_chan is set, don't move SAP to a different channel when LTE channel avoidance event comes. Change-Id: I3dfdbb6d59769a8ff9b3b2e6d828feee94630569 CRs-Fixed: 2261795 --- core/hdd/src/wlan_hdd_main.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) 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);