summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/dfs_pri_detector.h
diff options
context:
space:
mode:
authorZefir Kurtisi2013-04-15 11:29:06 +0200
committerJohn W. Linville2013-04-22 21:17:40 +0200
commitca21cfde84e2cb0d64222cbb2ee2cf3163c5f068 (patch)
tree6bcfb450617e293d5777666b5c6c3674dd87d120 /drivers/net/wireless/ath/ath9k/dfs_pri_detector.h
parentrt2x00: Fix transmit power troubles on some Ralink RT30xx cards (diff)
downloadkernel-qcow2-linux-ca21cfde84e2cb0d64222cbb2ee2cf3163c5f068.tar.gz
kernel-qcow2-linux-ca21cfde84e2cb0d64222cbb2ee2cf3163c5f068.tar.xz
kernel-qcow2-linux-ca21cfde84e2cb0d64222cbb2ee2cf3163c5f068.zip
ath9k: change DFS logging to use ath_dbg()
The DFS pattern detector was initially planned to reside on a higher layer and used generic pr_*() logging functions. Being part of ath9k, use ath_dbg() instead and make DFS log ouput selectable via ATH_DBG_DFS (0x20000) at runtime. This patch does not contain functional modifications. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/dfs_pri_detector.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/dfs_pri_detector.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/dfs_pri_detector.h b/drivers/net/wireless/ath/ath9k/dfs_pri_detector.h
index 81cde9f28e44..723962d1abc6 100644
--- a/drivers/net/wireless/ath/ath9k/dfs_pri_detector.h
+++ b/drivers/net/wireless/ath/ath9k/dfs_pri_detector.h
@@ -20,9 +20,31 @@
#include <linux/list.h>
/**
+ * struct pri_sequence - sequence of pulses matching one PRI
+ * @head: list_head
+ * @pri: pulse repetition interval (PRI) in usecs
+ * @dur: duration of sequence in usecs
+ * @count: number of pulses in this sequence
+ * @count_falses: number of not matching pulses in this sequence
+ * @first_ts: time stamp of first pulse in usecs
+ * @last_ts: time stamp of last pulse in usecs
+ * @deadline_ts: deadline when this sequence becomes invalid (first_ts + dur)
+ */
+struct pri_sequence {
+ struct list_head head;
+ u32 pri;
+ u32 dur;
+ u32 count;
+ u32 count_falses;
+ u64 first_ts;
+ u64 last_ts;
+ u64 deadline_ts;
+};
+
+/**
* struct pri_detector - PRI detector element for a dedicated radar type
* @exit(): destructor
- * @add_pulse(): add pulse event, returns true if pattern was detected
+ * @add_pulse(): add pulse event, returns pri_sequence if pattern was detected
* @reset(): clear states and reset to given time stamp
* @rs: detector specs for this detector element
* @last_ts: last pulse time stamp considered for this element in usecs
@@ -34,7 +56,8 @@
*/
struct pri_detector {
void (*exit) (struct pri_detector *de);
- bool (*add_pulse)(struct pri_detector *de, struct pulse_event *e);
+ struct pri_sequence *
+ (*add_pulse)(struct pri_detector *de, struct pulse_event *e);
void (*reset) (struct pri_detector *de, u64 ts);
/* private: internal use only */