]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.162/cfg80211-extend-range-deviation-for-dmg.patch
Linux 4.9.162
[thirdparty/kernel/stable-queue.git] / releases / 4.9.162 / cfg80211-extend-range-deviation-for-dmg.patch
1 From 33e44e428d05e81651bda47a8bbc4b17758ac152 Mon Sep 17 00:00:00 2001
2 From: Chaitanya Tata <chaitanya.tata@bluwirelesstechnology.com>
3 Date: Sat, 19 Jan 2019 03:17:47 +0530
4 Subject: cfg80211: extend range deviation for DMG
5
6 [ Upstream commit 93183bdbe73bbdd03e9566c8dc37c9d06b0d0db6 ]
7
8 Recently, DMG frequency bands have been extended till 71GHz, so extend
9 the range check till 20GHz (45-71GHZ), else some channels will be marked
10 as disabled.
11
12 Signed-off-by: Chaitanya Tata <Chaitanya.Tata@bluwireless.co.uk>
13 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 Signed-off-by: Sasha Levin <sashal@kernel.org>
15 ---
16 net/wireless/reg.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 diff --git a/net/wireless/reg.c b/net/wireless/reg.c
20 index 36d1d25082e32..7c19d0d2549b1 100644
21 --- a/net/wireless/reg.c
22 +++ b/net/wireless/reg.c
23 @@ -773,7 +773,7 @@ static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range,
24 * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"),
25 * however it is safe for now to assume that a frequency rule should not be
26 * part of a frequency's band if the start freq or end freq are off by more
27 - * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the
28 + * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the
29 * 60 GHz band.
30 * This resolution can be lowered and should be considered as we add
31 * regulatory rule support for other "bands".
32 @@ -788,7 +788,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range,
33 * with the Channel starting frequency above 45 GHz.
34 */
35 u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ?
36 - 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
37 + 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
38 if (abs(freq_khz - freq_range->start_freq_khz) <= limit)
39 return true;
40 if (abs(freq_khz - freq_range->end_freq_khz) <= limit)
41 --
42 2.19.1
43