From: Johannes Berg Date: Tue, 4 Dec 2012 19:49:42 +0000 (+0100) Subject: cfg80211: check no-OFDM flag for channels wider than 20 MHz X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6662dbae0b3a7a91317ec88b5aa0cf8d716f183;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/net/wireless/chan.c b/net/wireless/chan.c index b5f69831e318..a7990bb16529 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;