]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: validate number of different channels
authorJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2018 08:32:36 +0000 (09:32 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Jan 2018 08:34:45 +0000 (09:34 +0100)
commit2cbb348e10d47bdd3530ffb0c92d2ea76ba05d82
tree752cda62d1295f7e15553e4000461cb8f4142f54
parentf5855e058362b62022d71d446d2b9dc82750bfdf
mac80211_hwsim: validate number of different channels

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: c4c044c89e09 ("mac80211_hwsim: fix number of channels in interface combinations")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c
include/net/cfg80211.h
net/wireless/core.h