]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
cfg80211: check no-OFDM flag for channels wider than 20 MHz
authorJohannes Berg <johannes.berg@intel.com>
Tue, 4 Dec 2012 19:49:42 +0000 (20:49 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Dec 2012 19:51:27 +0000 (20:51 +0100)
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>
net/wireless/chan.c

index b5f69831e31848ec2af3fb46d4bf594ee17e9319..a7990bb165295bcefbd88c6396026e2db8b7fa38 100644 (file)
@@ -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;