]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: calculate if_combination.max_interfaces
authorJohannes Berg <johannes.berg@intel.com>
Fri, 29 Mar 2019 07:56:22 +0000 (08:56 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2019 11:31:24 +0000 (13:31 +0200)
commitc41c445ebed8c8b0771c0fb95ca551fff6a4b947
treed40f93ed046c8974e4d2b2c0962e3ec6934ceb29
parenta5703687edc3910ec87e104426919ae543af1c29
mac80211_hwsim: calculate if_combination.max_interfaces

If we just set this to 2048, and have multiple limits you
can select from, the total number might run over and cause
a warning in cfg80211. This doesn't make sense, so we just
calculate the total max_interfaces now.

Reported-by: syzbot+8f91bd563bbff230d0ee@syzkaller.appspotmail.com
Fixes: efdd9c362215 ("mac80211_hwsim: allow setting iftype support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c