diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2018-01-15 09:32:36 +0100 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2018-03-03 15:52:22 +0000 |
| commit | 764e93142fb5c115f4f39ff6192ee37554577afc (patch) | |
| tree | b7b8ec230874d688811865d7b827cb40c2405fbe /include | |
| parent | b47ac6dab7777172e31e014a7be2dbd7b484557f (diff) | |
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 'include')
| -rw-r--r-- | include/net/cfg80211.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 024ab92822fd..5d636bbd81a9 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -716,6 +716,8 @@ struct cfg80211_csa_settings { u8 count; }; +#define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10 + /** * enum station_parameters_apply_mask - station parameter values to apply * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) |
