diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath9k/regd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath9k/regd.c b/drivers/net/wireless/ath9k/regd.c index b84fbe30109b..cccec40139c2 100644 --- a/drivers/net/wireless/ath9k/regd.c +++ b/drivers/net/wireless/ath9k/regd.c | |||
@@ -154,6 +154,12 @@ const struct ieee80211_regdomain *ath9k_world_regdomain(struct ath_hal *ah) | |||
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | /* Frequency is one where radar detection is required */ | ||
158 | static bool ath9k_is_radar_freq(u16 center_freq) | ||
159 | { | ||
160 | return (center_freq >= 5260 && center_freq <= 5700); | ||
161 | } | ||
162 | |||
157 | /* Enable adhoc on 5 GHz if allowed by 11d */ | 163 | /* Enable adhoc on 5 GHz if allowed by 11d */ |
158 | static void ath9k_reg_apply_5ghz_adhoc_flags(struct wiphy *wiphy, | 164 | static void ath9k_reg_apply_5ghz_adhoc_flags(struct wiphy *wiphy, |
159 | enum reg_set_by setby) | 165 | enum reg_set_by setby) |
@@ -247,9 +253,7 @@ void ath9k_reg_apply_radar_flags(struct wiphy *wiphy) | |||
247 | 253 | ||
248 | for (i = 0; i < sband->n_channels; i++) { | 254 | for (i = 0; i < sband->n_channels; i++) { |
249 | ch = &sband->channels[i]; | 255 | ch = &sband->channels[i]; |
250 | if (ch->center_freq < 5260) | 256 | if (!ath9k_is_radar_freq(ch->center_freq)) |
251 | continue; | ||
252 | if (ch->center_freq > 5700) | ||
253 | continue; | 257 | continue; |
254 | /* We always enable radar detection/DFS on this | 258 | /* We always enable radar detection/DFS on this |
255 | * frequency range. Additionally we also apply on | 259 | * frequency range. Additionally we also apply on |