From: Johannes Berg Date: Thu, 13 Dec 2012 23:19:08 +0000 (+0100) Subject: cfg80211: adjacent 80+80 MHz channel segments are invalid X-Git-Tag: v3.9-rc1~139^2~242^2^2~132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cab315190cddbe3aaa31b64841354dd719afdfd;p=platform%2Fkernel%2Flinux-3.10.git cfg80211: adjacent 80+80 MHz channel segments are invalid In that case, it's really a 160 MHz channel, so disallow this configuration. Signed-off-by: Johannes Berg --- diff --git a/net/wireless/chan.c b/net/wireless/chan.c index a7990bb..396373f 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -76,6 +76,10 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) return false; if (!chandef->center_freq2) return false; + /* adjacent is not allowed -- that's a 160 MHz channel */ + if (chandef->center_freq1 - chandef->center_freq2 == 80 || + chandef->center_freq2 - chandef->center_freq1 == 80) + return false; break; case NL80211_CHAN_WIDTH_80: if (chandef->center_freq1 != control_freq + 30 &&