diff options
author | Chaitanya Tata <chaitanya.tata@bluwirelesstechnology.com> | 2019-01-18 16:47:47 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-01-25 04:18:51 -0500 |
commit | 93183bdbe73bbdd03e9566c8dc37c9d06b0d0db6 (patch) | |
tree | e580eb1b72c2ecc28662b03643f3400aa1619ede /net/wireless | |
parent | faae54ad4151f120bde60fd6e2b2a40e0de8ac73 (diff) |
cfg80211: extend range deviation for DMG
Recently, DMG frequency bands have been extended till 71GHz, so extend
the range check till 20GHz (45-71GHZ), else some channels will be marked
as disabled.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@bluwireless.co.uk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/reg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 35399a825aed..dd58b9909ac9 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1260,7 +1260,7 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd) | |||
1260 | * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), | 1260 | * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), |
1261 | * however it is safe for now to assume that a frequency rule should not be | 1261 | * however it is safe for now to assume that a frequency rule should not be |
1262 | * part of a frequency's band if the start freq or end freq are off by more | 1262 | * part of a frequency's band if the start freq or end freq are off by more |
1263 | * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the | 1263 | * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the |
1264 | * 60 GHz band. | 1264 | * 60 GHz band. |
1265 | * This resolution can be lowered and should be considered as we add | 1265 | * This resolution can be lowered and should be considered as we add |
1266 | * regulatory rule support for other "bands". | 1266 | * regulatory rule support for other "bands". |
@@ -1275,7 +1275,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range, | |||
1275 | * with the Channel starting frequency above 45 GHz. | 1275 | * with the Channel starting frequency above 45 GHz. |
1276 | */ | 1276 | */ |
1277 | u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? | 1277 | u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? |
1278 | 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; | 1278 | 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; |
1279 | if (abs(freq_khz - freq_range->start_freq_khz) <= limit) | 1279 | if (abs(freq_khz - freq_range->start_freq_khz) <= limit) |
1280 | return true; | 1280 | return true; |
1281 | if (abs(freq_khz - freq_range->end_freq_khz) <= limit) | 1281 | if (abs(freq_khz - freq_range->end_freq_khz) <= limit) |