Bladeren bron

qca-wifi: Set Agile DFS active for the calling PDEV

As part of vdev start response, dfs_precac_agile_start() is
called which is intended to set the agile active bit for
the VAP's pdev and start preCAC if possible and not already
running. The active bit for a dfs/pdev indicates that there
is at least one active VAP for that dfs/pdev object.

To set the "agile_precac_active" bit, the "cur_precac_dfs_index"
is used instead of the index of the "dfs" that calls the function.
"cur_precac_dfs_index" need not always indicate the "dfs" that
calls the function.

Consider a case where there are two active 5G radios (DBS_SBS),
both with preCAC enabled. For the first vdev start response of
radio A, dfs_precac_agile_start() is called which sets the agile
precac active bit for radio A and starts preCAC. Now for the
first vdev start response of radio B, dfs_precac_agile_start will
set the current preCAC index as active, which is radio A (which
was already set). The agile preCAC active bit is never set for
radio B even though it has an active VAP and agile capable.
Because of this, after radio A completes preCAC, radio B does
not get a chance to run preCAC for it's channels.

Set the agile precac active bit for the calling radio,
irrespective of which pdev is currently running preCAC, to allow
preCAC when the radio get's a chance.

CRs-Fixed: 2705681
Change-Id: Id11c910c69c85ce9ae03e7989e784a272d5cd905
Vignesh Mohan 5 jaren geleden
bovenliggende
commit
3b5fc93c6b
1 gewijzigde bestanden met toevoegingen van 5 en 10 verwijderingen
  1. 5 10
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 5 - 10
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -5725,7 +5725,6 @@ void dfs_agile_precac_start(struct wlan_dfs *dfs)
 	struct dfs_agile_cac_params adfs_param;
 	uint8_t ocac_status = 0;
 	struct dfs_soc_priv_obj *dfs_soc_obj;
-	uint8_t cur_dfs_idx;
 
 	dfs_soc_obj = dfs->dfs_soc_obj;
 
@@ -5733,17 +5732,13 @@ void dfs_agile_precac_start(struct wlan_dfs *dfs)
 		 __func__, __LINE__,
 		dfs_soc_obj->precac_state_started);
 
-	if (!dfs_soc_obj->precac_state_started)
-		dfs_soc_obj->cur_precac_dfs_index = dfs->dfs_psoc_idx;
-
-	cur_dfs_idx = dfs_soc_obj->cur_precac_dfs_index;
-	dfs_soc_obj->dfs_priv[cur_dfs_idx].agile_precac_active = true;
+	dfs_soc_obj->dfs_priv[dfs->dfs_psoc_idx].agile_precac_active = true;
 	dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
-		 " setting true to cur_precac_dfs_index = %d, dfs: %pK",
-		 dfs_soc_obj->cur_precac_dfs_index,
-		 dfs->dfs_soc_obj->dfs_priv[cur_dfs_idx].dfs);
+		 "Agile preCAC set to active for dfs_index = %d, dfs: %pK",
+		 dfs->dfs_psoc_idx, dfs);
 
-	if (!dfs->dfs_soc_obj->precac_state_started) {
+	if (!dfs_soc_obj->precac_state_started) {
+		dfs_soc_obj->cur_precac_dfs_index = dfs->dfs_psoc_idx;
 		/*
 		 * Initiate first call to start preCAC here, for channel as 0,
 		 * and ocac_status as 0