From ab5a5ccf2b79be4f723ace3f7e01383c64afed4c Mon Sep 17 00:00:00 2001 From: Li Feng Date: Fri, 17 Jan 2020 10:42:26 +0800 Subject: [PATCH] qcacld-3.0: Enable p2p go gc force scc Enable p2p go gc force scc by adding logic to check the connected p2p gc when checking concurrent channel interfering and restart p2p go if needed. Change-Id: Idd01fbc2a358b463568844a420e1132355c1de4e CRs-Fixed: 2604955 --- .../policy_mgr/src/wlan_policy_mgr_action.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c index 5d95866bd8559..1426bbf02f11b 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c @@ -2052,7 +2052,7 @@ void policy_mgr_check_concurrent_intf_and_restart_sap( * capability change. * If sta exist, sap/p2p go may need switch channel to force scc */ - bool sta_check; + bool sta_check = false, gc_check = false; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { @@ -2097,6 +2097,16 @@ void policy_mgr_check_concurrent_intf_and_restart_sap( sta_check = !cc_count || policy_mgr_valid_sta_channel_check(psoc, op_ch_freq_list[0]); + cc_count = 0; + cc_count = policy_mgr_get_mode_specific_conn_info( + psoc, &op_ch_freq_list[cc_count], + &vdev_id[cc_count], PM_P2P_CLIENT_MODE); + if (!cc_count) + policy_mgr_debug("Could not get GC operating channel&vdevid"); + + gc_check = !!cc_count; + policy_mgr_debug("gc_check: %d", gc_check); + mcc_to_scc_switch = policy_mgr_get_mcc_to_scc_switch_mode(psoc); policy_mgr_info("MCC to SCC switch: %d chan: %d", @@ -2113,7 +2123,7 @@ sap_restart: */ if (restart_sap || ((mcc_to_scc_switch != QDF_MCC_TO_SCC_SWITCH_DISABLE) && - sta_check)) { + (sta_check || gc_check))) { if (pm_ctx->sta_ap_intf_check_work_info) { qdf_sched_work(0, &pm_ctx->sta_ap_intf_check_work); policy_mgr_info(