Opennet Firmware
radar_counter.patch
gehe zur Dokumentation dieser Datei
1Author: Kai-Uwe
2
3Index: on_firmware/openwrt/package/kernel/mac80211/patches/ath/496_radar_counter.patch
4===================================================================
5--- /dev/null
6+++ on_firmware/openwrt/package/kernel/mac80211/patches/ath/496_radar_counter.patch
7@@ -0,0 +1,45 @@
8+--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
9++++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
10+@@ -131,6 +131,8 @@
11+ &jp_radar_types,
12+ };
13+
14++static int radar_found_counter = 0;
15++
16+ /**
17+ * get_dfs_domain_radar_types() - get radar types for a given DFS domain
18+ * @param domain DFS domain
19+@@ -290,6 +292,15 @@
20+ dpd_reset(dpd);
21+ dpd->last_pulse_ts = event->ts;
22+
23++ /* Apply radar threshold according to ETSI EN 301893 V2.1.1, D2.
24++ * Only signals stronger than -64 dBm (at 0 dBi) have to be detected.
25++ * To be safe we use a very conservative threshold of rssi 20.
26++ */
27++
28++ if (20 > event->rssi)
29++ return false;
30++
31++
32+ /* do type individual pattern matching */
33+ for (i = 0; i < dpd->num_radar_types; i++) {
34+ struct pri_detector *pd = cd->detectors[i];
35+@@ -297,8 +308,15 @@
36+ if (ps != NULL) {
37+ if (rs != NULL)
38+ memcpy(rs, pd->rs, sizeof(*rs));
39+- ath_dbg(dpd->common, DFS,
40+- "DFS: radar found on freq=%d: id=%d, pri=%d, "
41++
42++ if (radar_found_counter < 2) {
43++ radar_found_counter++;
44++ return false;
45++ }
46++ radar_found_counter = 0;
47++
48++
49++ printk( "DFS: radar found on freq=%d: id=%d, pri=%d, "
50+ "count=%d, count_false=%d\n",
51+ event->freq, pd->rs->type_id,
52+ ps->pri, ps->count, ps->count_falses);