Forráskód Böngészése

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
Yu Wang 4 éve
szülő
commit
e513fc5add

+ 4 - 3
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);