diff options
author | Alexei Avshalom Lazar <ailizaro@codeaurora.org> | 2018-08-13 08:33:00 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-08-28 05:23:08 -0400 |
commit | 9cf0a0b4b64ae103cf0e7dfaa72b44ecda24c0eb (patch) | |
tree | fea11a7f68a5ecd192b168f45308c6f088e94ad2 /net/wireless/util.c | |
parent | 21a5d4c3a45ca608477a083096cfbce76e449a0c (diff) |
cfg80211: Add support for 60GHz band channels 5 and 6
The current support in the 60GHz band is for channels 1-4.
Add support for channels 5 and 6.
This requires enlarging ieee80211_channel.center_freq from u16 to u32.
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 7bdcfe19b3ef..2a89db5f2db7 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -88,7 +88,7 @@ int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) | |||
88 | return 5000 + chan * 5; | 88 | return 5000 + chan * 5; |
89 | break; | 89 | break; |
90 | case NL80211_BAND_60GHZ: | 90 | case NL80211_BAND_60GHZ: |
91 | if (chan < 5) | 91 | if (chan < 7) |
92 | return 56160 + chan * 2160; | 92 | return 56160 + chan * 2160; |
93 | break; | 93 | break; |
94 | default: | 94 | default: |
@@ -109,7 +109,7 @@ int ieee80211_frequency_to_channel(int freq) | |||
109 | return (freq - 4000) / 5; | 109 | return (freq - 4000) / 5; |
110 | else if (freq <= 45000) /* DMG band lower limit */ | 110 | else if (freq <= 45000) /* DMG band lower limit */ |
111 | return (freq - 5000) / 5; | 111 | return (freq - 5000) / 5; |
112 | else if (freq >= 58320 && freq <= 64800) | 112 | else if (freq >= 58320 && freq <= 70200) |
113 | return (freq - 56160) / 2160; | 113 | return (freq - 56160) / 2160; |
114 | else | 114 | else |
115 | return 0; | 115 | return 0; |
@@ -1568,7 +1568,7 @@ bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef, | |||
1568 | } | 1568 | } |
1569 | 1569 | ||
1570 | /* 56.16 GHz, channel 1..4 */ | 1570 | /* 56.16 GHz, channel 1..4 */ |
1571 | if (freq >= 56160 + 2160 * 1 && freq <= 56160 + 2160 * 4) { | 1571 | if (freq >= 56160 + 2160 * 1 && freq <= 56160 + 2160 * 6) { |
1572 | if (chandef->width >= NL80211_CHAN_WIDTH_40) | 1572 | if (chandef->width >= NL80211_CHAN_WIDTH_40) |
1573 | return false; | 1573 | return false; |
1574 | 1574 | ||