summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-01-15 09:32:36 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-03-03 15:52:22 +0000
commit764e93142fb5c115f4f39ff6192ee37554577afc (patch)
treeb7b8ec230874d688811865d7b827cb40c2405fbe /net
parentb47ac6dab7777172e31e014a7be2dbd7b484557f (diff)
downloadlinux-stable-764e93142fb5c115f4f39ff6192ee37554577afc.tar.gz
linux-stable-764e93142fb5c115f4f39ff6192ee37554577afc.tar.bz2
linux-stable-764e93142fb5c115f4f39ff6192ee37554577afc.zip
mac80211_hwsim: validate number of different channels
commit 51a1aaa631c90223888d8beac4d649dc11d2ca55 upstream. When creating a new radio on the fly, hwsim allows this to be done with an arbitrary number of channels, but cfg80211 only supports a limited number of simultaneous channels, leading to a warning. Fix this by validating the number - this requires moving the define for the maximum out to a visible header file. Reported-by: syzbot+8dd9051ff19940290931@syzkaller.appspotmail.com Fixes: b59ec8dd4394 ("mac80211_hwsim: fix number of channels in interface combinations") Signed-off-by: Johannes Berg <johannes.berg@intel.com> [bwh: Backported to 3.16: - Test chans intead of param.channels - GENL_SET_ERR_MSG() is not available - Adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/core.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 805aaab05ffc..7a3b84010c48 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -456,8 +456,6 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev,
void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev);
-#define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10
-
#ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS
#define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond)
#else