mac80211: add missing patch chunk
[openwrt.git] / package / kernel / mac80211 / patches / 303-ath9k-DFS-consider-ext_channel-pulses-only-in-HT40-m.patch
1 From: Zefir Kurtisi <zefir.kurtisi@neratec.com>
2 Date: Tue, 16 Jun 2015 11:46:42 +0200
3 Subject: [PATCH] ath9k: DFS - consider ext_channel pulses only in HT40
4  mode
5
6 The chip reports radar pulses on extension channel
7 even if operating in HT20 mode. This patch adds a
8 sanity check for HT40 mode before it feeds pulses
9 on extension channel to the pattern detector.
10
11 Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
12 ---
13
14 --- a/drivers/net/wireless/ath/ath9k/dfs.c
15 +++ b/drivers/net/wireless/ath/ath9k/dfs.c
16 @@ -198,7 +198,8 @@ void ath9k_dfs_process_phyerr(struct ath
17         sc->dfs_prev_pulse_ts = pe.ts;
18         if (ard.pulse_bw_info & PRI_CH_RADAR_FOUND)
19                 ath9k_dfs_process_radar_pulse(sc, &pe);
20 -       if (ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
21 +       if (IS_CHAN_HT40(ah->curchan) &&
22 +           ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
23                 pe.freq += IS_CHAN_HT40PLUS(ah->curchan) ? 20 : -20;
24                 ath9k_dfs_process_radar_pulse(sc, &pe);
25         }