aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-13 18:19:08 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 07:01:32 -0500
commit9cab315190cddbe3aaa31b64841354dd719afdfd (patch)
tree27eea878d27475698839cc7295341d49c2ac5928 /net/wireless/chan.c
parent75de9113bb9dc4939a7cd54e4bdfad555b35f5b1 (diff)
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 <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index a7990bb16529..396373f3ec26 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)
76 return false; 76 return false;
77 if (!chandef->center_freq2) 77 if (!chandef->center_freq2)
78 return false; 78 return false;
79 /* adjacent is not allowed -- that's a 160 MHz channel */
80 if (chandef->center_freq1 - chandef->center_freq2 == 80 ||
81 chandef->center_freq2 - chandef->center_freq1 == 80)
82 return false;
79 break; 83 break;
80 case NL80211_CHAN_WIDTH_80: 84 case NL80211_CHAN_WIDTH_80:
81 if (chandef->center_freq1 != control_freq + 30 && 85 if (chandef->center_freq1 != control_freq + 30 &&