ath: enhance radar detection by looking up chirp
authorPeter Oh <poh@qca.qualcomm.com>
Wed, 4 Mar 2015 13:43:46 +0000 (15:43 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 5 Mar 2015 13:55:35 +0000 (15:55 +0200)
Certain radar types such as FCC radar type 5 are using chirp
in their pulses, hence looking up the chirp status will enhance
to avoid false radar detection.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/dfs_pri_detector.c

index 43b6081..1b5ad19 100644 (file)
@@ -390,6 +390,10 @@ static struct pri_sequence *pri_detector_add_pulse(struct pri_detector *de,
        if ((ts - de->last_ts) < rs->max_pri_tolerance)
                /* if delta to last pulse is too short, don't use this pulse */
                return NULL;
+       /* radar detector spec needs chirp, but not detected */
+       if (rs->chirp && rs->chirp != event->chirp)
+               return NULL;
+
        de->last_ts = ts;
 
        max_updated_seq = pseq_handler_add_to_existing_seqs(de, ts);