summaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/302-ath-DFS-limit-number-of-potential-PRI-sequences.patch
blob: e403e6a7ac42166ea71f51483c71dda85ea19afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Date: Tue, 16 Jun 2015 10:34:03 +0200
Subject: [PATCH] ath: DFS - limit number of potential PRI sequences

In the PRI detector, after the current radar pulse
has been checked agains existing PRI sequences, it
is considered as part of a new potential sequence.

Previously, the condition to accept a new sequence
was to have at least the same number of pulses as
the longest matching sequence. This was wrong,
since it led to duplicates of PRI sequences.

This patch changes the acceptance criteria for new
potential sequences from 'at least' to 'more than'
the longest existing.

Detection performance remains unaffected, while
the number of PRI sequences accounted at runtime
(and with it CPU load) is reduced by up to 50%.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---

--- a/drivers/net/wireless/ath/dfs_pri_detector.c
+++ b/drivers/net/wireless/ath/dfs_pri_detector.c
@@ -273,7 +273,7 @@ static bool pseq_handler_create_sequence
 				tmp_false_count++;
 			}
 		}
-		if (ps.count < min_count)
+		if (ps.count <= min_count)
 			/* did not reach minimum count, drop sequence */
 			continue;