From e513fc5addcdecba272b657aa6c37905bdf1ab12 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Fri, 4 Sep 2020 17:15:53 +0800 Subject: [PATCH] qcacld-3.0: disallow STA_P2PGO MCC on 5G DFS channel If STA is on 5G channel, starting P2P GO on a different 5G DFS channel should be rejected, but it's not, due to it didn't check the P2P GO specific configurations, but only check the one for SAP. To fix it, use P2P GO specific API to check the force scc status for P2P GO mode. CRs-Fixed: 2769182 Change-Id: Ibb3bb5e6e7f8a64e4483bdef863ce1f4294da9eb --- .../policy_mgr/src/wlan_policy_mgr_get_set_utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 03639bd7b13c..c7dabf1fddb8 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -2398,6 +2398,7 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc, uint32_t list[MAX_NUMBER_OF_CONC_CONNECTIONS]; struct policy_mgr_psoc_priv_obj *pm_ctx; bool sta_sap_scc_on_dfs_chan; + bool go_force_scc; uint32_t sta_freq; enum channel_state chan_state; bool is_dfs_ch = false; @@ -2462,9 +2463,9 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc, sta_sap_scc_on_dfs_chan = policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc); - - if (!sta_sap_scc_on_dfs_chan && ((mode == PM_P2P_GO_MODE) || - (mode == PM_SAP_MODE))) { + go_force_scc = policy_mgr_go_scc_enforced(psoc); + if ((!sta_sap_scc_on_dfs_chan && mode == PM_SAP_MODE) || + (!go_force_scc && mode == PM_P2P_GO_MODE)) { if (is_dfs_ch) match = policy_mgr_disallow_mcc(psoc, ch_freq);