summaryrefslogtreecommitdiffstats
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-04 20:49:42 +0100
committerJohannes Berg <johannes.berg@intel.com>2012-12-04 20:51:27 +0100
commita6662dbae0b3a7a91317ec88b5aa0cf8d716f183 (patch)
tree597efafa76ec2defa1f54dc194eb8846518cc73b /net/wireless/chan.c
parent2f91a96799d155d56a0663dbe00fc45c6721a763 (diff)
downloadop-kernel-dev-a6662dbae0b3a7a91317ec88b5aa0cf8d716f183.zip
op-kernel-dev-a6662dbae0b3a7a91317ec88b5aa0cf8d716f183.tar.gz
cfg80211: check no-OFDM flag for channels wider than 20 MHz
For channels wider than 20 MHz OFDM will be used, so when checking whether or not a channel is usable, check for the no-OFDM flag if the channel is wider than 20 MHz. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index b5f6983..a7990bb 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -265,6 +265,9 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
/* TODO: missing regulatory check on 80/160 bandwidth */
+ if (width > 20)
+ prohibited_flags |= IEEE80211_CHAN_NO_OFDM;
+
if (!cfg80211_secondary_chans_ok(wiphy, chandef->center_freq1,
width, prohibited_flags))
return false;
OpenPOWER on IntegriCloud