]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ath9k: non-functional: calculate DFS pulse interval per-wiphy
authorZefir Kurtisi <zefir.kurtisi@neratec.com>
Fri, 9 May 2014 13:19:42 +0000 (15:19 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 May 2014 19:56:34 +0000 (15:56 -0400)
Systems with multiple DFS channel detectors need to track
timestamp of previous pulse per instance to display the
correct pulse interval.

Since the interval value is used for debug printing only,
this is a non-functional modification.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/dfs.c
drivers/net/wireless/ath/ath9k/dfs_debug.h

index 857bb28b389411ea2e1586abd3f5c749c0127327..5049bec5c676c8cf5500702437c8674374bf9478 100644 (file)
@@ -178,12 +178,12 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
        pe.ts = mactime;
        if (ath9k_postprocess_radar_event(sc, &ard, &pe)) {
                struct dfs_pattern_detector *pd = sc->dfs_detector;
-               static u64 last_ts;
                ath_dbg(common, DFS,
                        "ath9k_dfs_process_phyerr: channel=%d, ts=%llu, "
                        "width=%d, rssi=%d, delta_ts=%llu\n",
-                       pe.freq, pe.ts, pe.width, pe.rssi, pe.ts-last_ts);
-               last_ts = pe.ts;
+                       pe.freq, pe.ts, pe.width, pe.rssi,
+                       pe.ts - sc->debug.stats.dfs_stats.last_ts);
+               sc->debug.stats.dfs_stats.last_ts = pe.ts;
                DFS_STAT_INC(sc, pulses_processed);
                if (pd != NULL && pd->add_pulse(pd, &pe)) {
                        DFS_STAT_INC(sc, radar_detected);
index 7936c9126a20d5dee79cae53bb2a06cdb78ed881..d9486867a5e00f089de4adb08989a59470ad26d7 100644 (file)
@@ -51,6 +51,7 @@ struct ath_dfs_stats {
        /* pattern detection stats */
        u32 pulses_processed;
        u32 radar_detected;
+       u64 last_ts;
 };
 
 #if defined(CONFIG_ATH9K_DFS_DEBUGFS)