ath9k: DFS - consider ext_channel pulses only in HT40 mode
authorZefir Kurtisi <zefir.kurtisi@neratec.com>
Tue, 16 Jun 2015 09:46:42 +0000 (11:46 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 11 Jul 2015 16:51:20 +0000 (19:51 +0300)
The chip reports radar pulses on extension channel
even if operating in HT20 mode. This patch adds a
sanity check for HT40 mode before it feeds pulses
on extension channel to the pattern detector.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/dfs.c

index e98a9eaba7ff3f1b84a85945e63e901c8a216207..5025a4e91a8bd2f5b03a9d13ffbfba5afb6b3472 100644 (file)
@@ -198,7 +198,8 @@ void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
        sc->dfs_prev_pulse_ts = pe.ts;
        if (ard.pulse_bw_info & PRI_CH_RADAR_FOUND)
                ath9k_dfs_process_radar_pulse(sc, &pe);
-       if (ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
+       if (IS_CHAN_HT40(ah->curchan) &&
+           ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
                pe.freq += IS_CHAN_HT40PLUS(ah->curchan) ? 20 : -20;
                ath9k_dfs_process_radar_pulse(sc, &pe);
        }