Browse Source

qcacld-3.0: New INI for STA+GO DFS SCC

In STA+SAP / GO concurrency, SCC is enforced by moving SAP / GO
to STA's operating channel. STA side, if there is a CSA
then SCC will be enforced only after STA moves to new channel.

In usecase of STA + GO SCC on DFS channel, CSA is sent with no-TX
and STA's movement will only happen once CSA count becomes 0.
This will block data transmission till then, which will have bad
user experience in case of XR where, it needs to have periodic data
transmission in every 1 second with GO interface.

This new INI is added to handle this scenario where SAP / GO will
move first followed by STA.

Change-Id: Id642872da4f3403a5168a2fad58b4c971cd88288
CRs-Fixed: 3380861
Rachit Kankane 2 years ago
parent
commit
6890f7410c

+ 44 - 1
components/cmn_services/policy_mgr/inc/cfg_policy_mgr.h

@@ -709,6 +709,48 @@ CFG_INI_BOOL("g_enable_sr_in_same_mac_conc", 1, \
 CFG_INI_BOOL("g_use_original_bw_for_sap_restart", 0, \
 	     "Use SAP original bandwidth when do restart")
 
+/*
+ * <ini>
+ * g_move_sap_go_1st_on_dfs_sta_csa - Move SAP / GO first to enforce scc
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini moves SAP / GO first to enforce scc in STA+SAP (GO) DFS SCC
+ * 0 - Keep default MCC to SCC enforcement movement
+ * 1 - Move SAP / GO first before STA's movement to non-DFS channel
+ *
+ * In STA+SAP / GO concurrency, SCC is enforced by moving SAP / GO
+ * to STA's operating channel. STA side, if there is a CSA
+ * then SCC will be enforced only after STA moves to new channel.
+ *
+ * In usecase of STA + GO SCC on DFS channel, CSA is sent with no-TX
+ * and STA's movement will only happen once CSA count becomes 0.
+ * This will block data transmission till then, which will have bad
+ * user experience in case of XR where, it needs to have periodic data
+ * transmission in every 1 second with GO interface.
+ *
+ * To resolve this, it is better to move GO / SAP first to allow 1
+ * second periodic transmissions. And once the STA moves to new channel,
+ * existing logic will be triggered to enforce SCC.
+ *
+ * This INI is added to change the behavior only in this specific case.
+ * If this INI is set, then move SAP / GO first upon receiving very first
+ * CSA from AP to a non-DFS channel. Current MCC to SCC rules will be applied
+ * once STA moves to new channel after CSA count becomes 0.
+ *
+ * Dependency: g_sta_sap_scc_on_dfs_chan, g_enable_go_force_scc
+ *
+ * Supported Feature: SAP / P2P-GO
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_MOVE_SAP_GO_1ST_ON_DFS_STA_CSA \
+CFG_INI_BOOL("g_move_sap_go_1st_on_dfs_sta_csa", 0, \
+	     "Move SAP / GO first to enforce scc on dfs sta csa")
+
 #define CFG_POLICY_MGR_ALL \
 		CFG(CFG_MCC_TO_SCC_SWITCH) \
 		CFG(CFG_CONC_SYS_PREF) \
@@ -734,5 +776,6 @@ CFG_INI_BOOL("g_use_original_bw_for_sap_restart", 0, \
 		CFG(CFG_PCL_BAND_PRIORITY) \
 		CFG(CFG_MULTI_SAP_ALLOWED_ON_SAME_BAND) \
 		CFG_SPATIAL_REUSE \
-		CFG(CFG_SAP_DEFAULT_BW_FOR_RESTART)
+		CFG(CFG_SAP_DEFAULT_BW_FOR_RESTART) \
+		CFG(CFG_MOVE_SAP_GO_1ST_ON_DFS_STA_CSA)
 #endif

+ 16 - 0
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -346,6 +346,22 @@ QDF_STATUS
 policy_mgr_get_original_bw_for_sap_restart(struct wlan_objmgr_psoc *psoc,
 					   bool *use_sap_original_bw);
 
+/**
+ * policy_mgr_get_dfs_sta_sap_go_scc_movement() - returns SAP / GO's movement
+ * in STA+SAP DFS SCC concurrency to whether SAP / GO should be moved first
+ * or not.
+ * @psoc: pointer to psoc
+ * @move_sap_go_first: value to be filled
+ *
+ * In STA+SAP DFS SCC concurrency, this API returns config on whether to move
+ * SAP / GO first on getting CSA STA side or not.
+ *
+ * Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
+ */
+QDF_STATUS
+policy_mgr_get_dfs_sta_sap_go_scc_movement(struct wlan_objmgr_psoc *psoc,
+					   bool *move_sap_go_first);
+
 /*
  * policy_mgr_get_connected_vdev_band_mask() - to get the connected vdev band
  * mask

+ 16 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -287,6 +287,22 @@ policy_mgr_get_original_bw_for_sap_restart(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS
+policy_mgr_get_dfs_sta_sap_go_scc_movement(struct wlan_objmgr_psoc *psoc,
+					   bool *move_sap_go_first)
+{
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
+
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("pm_ctx is NULL");
+		return QDF_STATUS_E_FAILURE;
+	}
+	*move_sap_go_first = pm_ctx->cfg.move_sap_go_1st_on_dfs_sta_csa;
+
+	return QDF_STATUS_SUCCESS;
+}
+
 static bool
 policy_mgr_update_dfs_master_dynamic_enabled(
 	struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)

+ 3 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h

@@ -273,6 +273,8 @@ extern enum policy_mgr_conc_next_action
  * @sr_in_same_mac_conc: Enable/Disable SR in same MAC concurrency
  * @use_sap_original_bw: Enable/Disable sap original BW as default
  *                       BW when do restart
+ * @move_sap_go_1st_on_dfs_sta_csa: Enable/Disable SAP / GO's movement
+ *				    to non-DFS channel before STA
  */
 struct policy_mgr_cfg {
 	uint8_t mcc_to_scc_switch;
@@ -302,6 +304,7 @@ struct policy_mgr_cfg {
 	bool sr_in_same_mac_conc;
 #endif
 	bool use_sap_original_bw;
+	bool move_sap_go_1st_on_dfs_sta_csa;
 };
 
 /**

+ 3 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -127,6 +127,8 @@ static QDF_STATUS policy_mgr_init_cfg(struct wlan_objmgr_psoc *psoc)
 	policy_mgr_init_same_mac_conc_sr_status(psoc);
 	cfg->use_sap_original_bw =
 		cfg_get(psoc, CFG_SAP_DEFAULT_BW_FOR_RESTART);
+	cfg->move_sap_go_1st_on_dfs_sta_csa =
+		cfg_get(psoc, CFG_MOVE_SAP_GO_1ST_ON_DFS_STA_CSA);
 
 	return QDF_STATUS_SUCCESS;
 }