Skip to content

Commit 3f3c09f

Browse files
zefir-kurtisilinvjw
authored andcommitted
ath9k: simplify DFS pulse interval debug printing
Make DFS pulse interval calculation independent from CONFIG_ATH9K_DEBUGFS. Signed-off-by: Zefir Kurtisi <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent d6755bd commit 3f3c09f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

drivers/net/wireless/ath/ath9k/ath9k.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ struct ath_softc {
770770
struct ath_ant_comb ant_comb;
771771
u8 ant_tx, ant_rx;
772772
struct dfs_pattern_detector *dfs_detector;
773+
u64 dfs_prev_pulse_ts;
773774
u32 wow_enabled;
774775
/* relay(fs) channel for spectral scan */
775776
struct rchan *rfs_chan_spec_scan;

drivers/net/wireless/ath/ath9k/dfs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,12 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
178178
pe.ts = mactime;
179179
if (ath9k_postprocess_radar_event(sc, &ard, &pe)) {
180180
struct dfs_pattern_detector *pd = sc->dfs_detector;
181-
#ifdef CONFIG_ATH9K_DEBUGFS
182181
ath_dbg(common, DFS,
183182
"ath9k_dfs_process_phyerr: channel=%d, ts=%llu, "
184183
"width=%d, rssi=%d, delta_ts=%llu\n",
185184
pe.freq, pe.ts, pe.width, pe.rssi,
186-
pe.ts - sc->debug.stats.dfs_stats.last_ts);
187-
sc->debug.stats.dfs_stats.last_ts = pe.ts;
188-
#endif
185+
pe.ts - sc->dfs_prev_pulse_ts);
186+
sc->dfs_prev_pulse_ts = pe.ts;
189187
DFS_STAT_INC(sc, pulses_processed);
190188
if (pd != NULL && pd->add_pulse(pd, &pe)) {
191189
DFS_STAT_INC(sc, radar_detected);

drivers/net/wireless/ath/ath9k/dfs_debug.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ struct ath_dfs_stats {
5151
/* pattern detection stats */
5252
u32 pulses_processed;
5353
u32 radar_detected;
54-
u64 last_ts;
5554
};
5655

5756
#if defined(CONFIG_ATH9K_DFS_DEBUGFS)

0 commit comments

Comments
 (0)