aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/dfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/dfs.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/dfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c
index 6fee9a464cce..acb9602aa464 100644
--- a/drivers/net/wireless/ath/ath9k/dfs.c
+++ b/drivers/net/wireless/ath/ath9k/dfs.c
@@ -41,7 +41,7 @@ static const int BIN_DELTA_MAX = 10;
41 41
42/* we need at least 3 deltas / 4 samples for a reliable chirp detection */ 42/* we need at least 3 deltas / 4 samples for a reliable chirp detection */
43#define NUM_DIFFS 3 43#define NUM_DIFFS 3
44static const int FFT_NUM_SAMPLES = (NUM_DIFFS + 1); 44#define FFT_NUM_SAMPLES (NUM_DIFFS + 1)
45 45
46/* Threshold for difference of delta peaks */ 46/* Threshold for difference of delta peaks */
47static const int MAX_DIFF = 2; 47static const int MAX_DIFF = 2;
@@ -114,7 +114,7 @@ static bool ath9k_check_chirping(struct ath_softc *sc, u8 *data,
114 114
115 ath_dbg(common, DFS, "HT40: datalen=%d, num_fft_packets=%d\n", 115 ath_dbg(common, DFS, "HT40: datalen=%d, num_fft_packets=%d\n",
116 datalen, num_fft_packets); 116 datalen, num_fft_packets);
117 if (num_fft_packets < (FFT_NUM_SAMPLES)) { 117 if (num_fft_packets < FFT_NUM_SAMPLES) {
118 ath_dbg(common, DFS, "not enough packets for chirp\n"); 118 ath_dbg(common, DFS, "not enough packets for chirp\n");
119 return false; 119 return false;
120 } 120 }
@@ -136,7 +136,7 @@ static bool ath9k_check_chirping(struct ath_softc *sc, u8 *data,
136 return false; 136 return false;
137 ath_dbg(common, DFS, "HT20: datalen=%d, num_fft_packets=%d\n", 137 ath_dbg(common, DFS, "HT20: datalen=%d, num_fft_packets=%d\n",
138 datalen, num_fft_packets); 138 datalen, num_fft_packets);
139 if (num_fft_packets < (FFT_NUM_SAMPLES)) { 139 if (num_fft_packets < FFT_NUM_SAMPLES) {
140 ath_dbg(common, DFS, "not enough packets for chirp\n"); 140 ath_dbg(common, DFS, "not enough packets for chirp\n");
141 return false; 141 return false;
142 } 142 }
@@ -277,7 +277,7 @@ ath9k_dfs_process_radar_pulse(struct ath_softc *sc, struct pulse_event *pe)
277 DFS_STAT_INC(sc, pulses_processed); 277 DFS_STAT_INC(sc, pulses_processed);
278 if (pd == NULL) 278 if (pd == NULL)
279 return; 279 return;
280 if (!pd->add_pulse(pd, pe)) 280 if (!pd->add_pulse(pd, pe, NULL))
281 return; 281 return;
282 DFS_STAT_INC(sc, radar_detected); 282 DFS_STAT_INC(sc, radar_detected);
283 ieee80211_radar_detected(sc->hw); 283 ieee80211_radar_detected(sc->hw);