Bläddra i källkod

qca-wifi: Assign agile detector id based on true 160MHz

For Pine chip, where true 160MHz (single detector for 160MHz)
is supported, the agile detector ID is 1 (instead of 2 for
chipsets like Hawkeye with two primary 80MHz detectors).
Assign the dfs_agile_detector_id to the proper value based on
true 160MHz capability.

Introduce a new API to get the agile_detector_id based on the
chip's capability. Use the new API to get the agile_detector_id
instead of using the existing enum.

CRs-Fixed: 2637793
Change-Id: I8033e541c09632a9e4c7be1a5067d1dbcedd0d48
Vignesh Mohan 5 år sedan
förälder
incheckning
764dcecbb9
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6 2
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 6 - 2
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -1675,7 +1675,7 @@ void dfs_mark_precac_nol(struct wlan_dfs *dfs,
 		 * Set precac_state_started to false to indicate preCAC is not
 		 * running and also reset the current Agile channel.
 		 */
-		if (detector_id == AGILE_DETECTOR_ID) {
+		if (detector_id == dfs_get_agile_detector_id(dfs)) {
 			dfs_prepare_agile_precac_chan(dfs);
 		} else {
 			dfs->dfs_agile_precac_freq = 0;
@@ -1809,7 +1809,7 @@ void dfs_mark_precac_nol_for_freq(struct wlan_dfs *dfs,
 		 * Set precac_state_started to false to indicate preCAC is not
 		 * running and also reset the current Agile channel.
 		 */
-		if (detector_id == AGILE_DETECTOR_ID) {
+		if (detector_id == dfs_get_agile_detector_id(dfs)) {
 			dfs_prepare_agile_precac_chan(dfs);
 		} else {
 			dfs->dfs_agile_precac_freq_mhz = 0;
@@ -2263,6 +2263,10 @@ void dfs_zero_cac_attach(struct wlan_dfs *dfs)
 {
 	dfs->dfs_precac_timeout_override = -1;
 	PRECAC_LIST_LOCK_CREATE(dfs);
+	if (dfs_is_true_160mhz_supported(dfs))
+		dfs->dfs_agile_detector_id = AGILE_DETECTOR_ID_TRUE_160MHZ;
+	else
+		dfs->dfs_agile_detector_id = AGILE_DETECTOR_ID_80P80;
 }
 
 /* dfs_init_precac_tree_node() - Initialise the preCAC BSTree node with the