Browse Source

Merge "qca-wifi: Add extra time for agile precac timeout"

Linux Build Service Account 5 years ago
parent
commit
a5d06d69dc
1 changed files with 13 additions and 2 deletions
  1. 13 2
      umac/dfs/core/src/misc/dfs_zero_cac.c

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

@@ -3189,6 +3189,7 @@ static bool dfs_is_pcac_on_weather_channel_for_freq(struct wlan_dfs *dfs,
  * @ocac_status: OCAC Status.
  * @adfs_param: Pointer to ADFS params.
  */
+#define EXTRA_TIME_IN_MS 2000
 #ifdef CONFIG_CHAN_FREQ_API
 void dfs_start_agile_precac_timer(struct wlan_dfs *dfs,
 				  uint8_t ocac_status,
@@ -3224,9 +3225,14 @@ void dfs_start_agile_precac_timer(struct wlan_dfs *dfs,
 
 	dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
 		 "precactimeout = %d ms", (min_precac_timeout));
-	qdf_timer_mod(&dfs_soc_obj->dfs_precac_timer, min_precac_timeout);
+	/* Add the preCAC timeout in the params to be sent to FW. */
 	adfs_param->min_precac_timeout = min_precac_timeout;
 	adfs_param->max_precac_timeout = max_precac_timeout;
+	/* Increase the preCAC timeout in HOST by 2 seconds to avoid
+	 * FW OCAC completion event and HOST timer firing at same time. */
+	if (min_precac_timeout)
+		min_precac_timeout += EXTRA_TIME_IN_MS;
+	qdf_timer_mod(&dfs_soc_obj->dfs_precac_timer, min_precac_timeout);
 }
 #else
 #ifdef CONFIG_CHAN_NUM_API
@@ -3264,9 +3270,14 @@ void dfs_start_agile_precac_timer(struct wlan_dfs *dfs,
 
 	dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
 		 "precactimeout = %d ms", (min_precac_timeout));
-	qdf_timer_mod(&dfs_soc_obj->dfs_precac_timer, min_precac_timeout);
+	/* Add the preCAC timeout in the params to be sent to FW. */
 	adfs_param->min_precac_timeout = min_precac_timeout;
 	adfs_param->max_precac_timeout = max_precac_timeout;
+	/* Increase the preCAC timeout in HOST by 2 seconds to avoid
+	 * FW OCAC completion event and HOST timer firing at same time. */
+	if (min_precac_timeout)
+		min_precac_timeout += EXTRA_TIME_IN_MS;
+	qdf_timer_mod(&dfs_soc_obj->dfs_precac_timer, min_precac_timeout);
 }
 #endif
 #endif