diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/dfs_pri_detector.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/dfs_pri_detector.h | 27 |
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 81cde9f28e4..723962d1abc 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 */ |