Ver Fonte

qcacmn: Reset radar queues after disabling phyerror processing

When the phyerrors get accumulated in the radar queue and matches a filter,
the radar queues is  reset. But the phyerror reception is not disabled
immediately, instead only done after taking radar action. In this interval,
the radar queue still continues to accumulate pulses until phyerror
reception is disabled.
When radar action is completed, channel is changed and phyerror reception
is re-enabled, the existing pulses in the radar queue continue to exist
and cause false radar on the newly changed channel. This will potentially
add all the dfs channels to NOL.

In order to avoid such a scenario, reset all the delaylines, radar queues
and the associated stats variables after disabling the phyerror
reception.

CRs-Fixed: 2891715
Change-Id: I6ad202a6d99d313895b347119fcae0a2a2651ca1
Vignesh U há 4 anos atrás
pai
commit
1bcf72f3f8

+ 14 - 1
umac/dfs/core/src/dfs_process_radar_found_ind.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2021 The Linux Foundation. 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
@@ -25,6 +25,19 @@
 
 #ifndef _DFS_PROCESS_RADAR_FOUND_IND_H_
 #define _DFS_PROCESS_RADAR_FOUND_IND_H_
+#include "dfs_partial_offload_radar.h"
+
+/**
+ * dfs_false_radarfound_reset_vars () - Reset dfs radar detection related
+ * variables and queues after processing radar and disabling phyerror reception.
+ *
+ * @dfs: Pointer to wlan_dfs structure.
+ */
+static inline void
+dfs_flush_additional_pulses(struct wlan_dfs *dfs)
+{
+	dfs_false_radarfound_reset_vars(dfs);
+}
 
 /* Number of channel marking offsets */
 #define DFS_NUM_FREQ_OFFSET   3

+ 9 - 1
umac/dfs/core/src/misc/dfs_process_radar_found_ind.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2021 The Linux Foundation. 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
@@ -1283,6 +1283,14 @@ dfs_process_radar_ind_on_home_chan(struct wlan_dfs *dfs,
 	if (!dfs->dfs_is_offload_enabled) {
 		dfs_radar_disable(dfs);
 		dfs_second_segment_radar_disable(dfs);
+		/*
+		 * The radar queues were reset just after the filter match, but
+		 * the phyerror reception was not disabled. This might
+		 * cause the unwanted additional/accumulated pulses to be
+		 * detected as radar in the new channel. So, clear the radar
+		 * queues and the associated variables.
+		 */
+		dfs_flush_additional_pulses(dfs);
 	}
 
 	dfs_mlme_mark_dfs(dfs->dfs_pdev_obj,