303-ath9k-DFS-consider-ext_channel-pulses-only-in-HT40-m.patch 927 B

12345678910111213141516171819202122232425
  1. From: Zefir Kurtisi <[email protected]>
  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. The chip reports radar pulses on extension channel
  6. even if operating in HT20 mode. This patch adds a
  7. sanity check for HT40 mode before it feeds pulses
  8. on extension channel to the pattern detector.
  9. Signed-off-by: Zefir Kurtisi <[email protected]>
  10. ---
  11. --- a/drivers/net/wireless/ath/ath9k/dfs.c
  12. +++ b/drivers/net/wireless/ath/ath9k/dfs.c
  13. @@ -198,7 +198,8 @@ void ath9k_dfs_process_phyerr(struct ath
  14. sc->dfs_prev_pulse_ts = pe.ts;
  15. if (ard.pulse_bw_info & PRI_CH_RADAR_FOUND)
  16. ath9k_dfs_process_radar_pulse(sc, &pe);
  17. - if (ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
  18. + if (IS_CHAN_HT40(ah->curchan) &&
  19. + ard.pulse_bw_info & EXT_CH_RADAR_FOUND) {
  20. pe.freq += IS_CHAN_HT40PLUS(ah->curchan) ? 20 : -20;
  21. ath9k_dfs_process_radar_pulse(sc, &pe);
  22. }