From 2e5f31d731603c78eb143acfcb4e60f7d6526db4 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 14 Aug 2019 18:59:38 +0800 Subject: [PATCH] qcacld-3.0: Do not remove unsafe channel for SAP If g_sta_sap_scc_on_lte_coex_chan != 0, the SAP and STA SCC on unsafe channel is allowed. The change keeps the unsafe channel in SAP channel list if STA is active on the channel. Change-Id: I328841df611a000b1c4d4d09618a4035f0b7fba6 CRs-Fixed: 2509730 --- .../cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c index 71793c18fd6a..3ba39eefd373 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c @@ -184,6 +184,7 @@ void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc, uint8_t i, j; uint32_t safe_channel_count = 0, current_channel_count = 0; struct policy_mgr_psoc_priv_obj *pm_ctx; + uint8_t scc_on_lte_coex = 0; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { @@ -210,6 +211,7 @@ void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc, qdf_mem_copy(org_weight_list, weight_list, QDF_MAX_NUM_CHAN); qdf_mem_zero(weight_list, weight_len); + policy_mgr_get_sta_sap_scc_lte_coex_chnl(psoc, &scc_on_lte_coex); for (i = 0; i < current_channel_count; i++) { is_unsafe = 0; for (j = 0; j < pm_ctx->unsafe_channel_count; j++) { @@ -222,6 +224,13 @@ void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc, break; } } + if (is_unsafe && scc_on_lte_coex && + policy_mgr_is_sta_sap_scc(psoc, current_channel_list[i])) { + policy_mgr_debug("CH %d unsafe ingored when STA present on it", + current_channel_list[i]); + is_unsafe = 0; + } + if (!is_unsafe) { pcl_channels[safe_channel_count] = current_channel_list[i];