Переглянути джерело

qcacmn: Skip CAC and ignore radar indication for SAP

If STA is already connected on DFS channel and SAP is going to start
on the same channel then skip the CAC for SAP.
If STA and SAP sessions are already operating on same DFS channel,
then ignore radar indication received on SAP interface.

CRs-Fixed: 2262494
Change-Id: Ife0ab6979a07c8773001a43f5a30c9a555dab37a
Bala Venkatesh 6 роки тому
батько
коміт
832f0e8243

+ 13 - 7
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -1733,7 +1733,7 @@ void policy_mgr_set_weight_of_dfs_passive_channels_to_zero(
 {
 	uint8_t i;
 	uint32_t orig_channel_count = 0;
-	bool mcc_to_scc_mode;
+	bool sta_sap_scc_on_dfs_chan;
 	uint32_t sap_count;
 	enum channel_state channel_state;
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
@@ -1744,13 +1744,14 @@ void policy_mgr_set_weight_of_dfs_passive_channels_to_zero(
 		return;
 	}
 
-	mcc_to_scc_mode = policy_mgr_is_force_scc(psoc);
+	sta_sap_scc_on_dfs_chan =
+		policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
 	sap_count = policy_mgr_mode_specific_connection_count(psoc,
 			PM_SAP_MODE, NULL);
-	policy_mgr_debug("mcc_to_scc_mode %u, sap_count %u", mcc_to_scc_mode,
-			sap_count);
+	policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u",
+			 sta_sap_scc_on_dfs_chan, sap_count);
 
-	if (!mcc_to_scc_mode || !sap_count)
+	if (!sta_sap_scc_on_dfs_chan || !sap_count)
 		return;
 
 	if (len)
@@ -1810,6 +1811,7 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
 	bool skip_dfs_channel = false;
 	uint32_t i = 0, j = 0;
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
+	bool sta_sap_scc_on_dfs_chan;
 
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
@@ -1844,9 +1846,13 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
 	 * if you have atleast one STA connection then don't fill DFS channels
 	 * in the preferred channel list
 	 */
-	if (((mode == PM_SAP_MODE) || (mode == PM_P2P_GO_MODE)) &&
+	sta_sap_scc_on_dfs_chan =
+		policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
+	policy_mgr_debug("sta_sap_scc_on_dfs_chan %u", sta_sap_scc_on_dfs_chan);
+	if ((((mode == PM_SAP_MODE) || (mode == PM_P2P_GO_MODE)) &&
 	    (policy_mgr_mode_specific_connection_count(
-		psoc, PM_STA_MODE, NULL) > 0)) {
+		psoc, PM_STA_MODE, NULL) > 0)) ||
+		!sta_sap_scc_on_dfs_chan) {
 		policy_mgr_debug("STA present, skip DFS channels from pcl for SAP/Go");
 		skip_dfs_channel = true;
 	}

+ 8 - 1
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1540,6 +1540,7 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc,
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 	QDF_STATUS ret;
 	struct policy_mgr_pcl_list pcl;
+	bool sta_sap_scc_on_dfs_chan;
 
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
@@ -1594,7 +1595,13 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc,
 			channel, list, PM_SAP_MODE))
 			goto done;
 
-		if ((PM_P2P_GO_MODE == mode) || (PM_SAP_MODE == mode)) {
+		sta_sap_scc_on_dfs_chan =
+			policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
+		policy_mgr_debug("sta_sap_scc_on_dfs_chan %u",
+				 sta_sap_scc_on_dfs_chan);
+
+		if (!sta_sap_scc_on_dfs_chan && ((mode == PM_P2P_GO_MODE) ||
+		    (mode == PM_SAP_MODE))) {
 			if (wlan_reg_is_dfs_ch(pm_ctx->pdev, channel))
 				match = policy_mgr_disallow_mcc(psoc, channel);
 		}