diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-04-24 13:01:04 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-04-24 13:38:20 +0300 |
commit | be689f68d040702a3521035d267949d3927971f0 (patch) | |
tree | 8cb2e2acbc16a5f7b5c70308dba371ffe78f3b5e /net/wireless/core.c | |
parent | 3b23c184f72acddad39c40373f165e1a9e384758 (diff) | |
download | linux-be689f68d040702a3521035d267949d3927971f0.tar.xz |
cfg80211: reject channels/chandefs with KHz offset >= 1000
This should be covered by the next MHz, make sure that the
numbers are always normalized.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200424120103.12b91ecf75f9.I4bf499d58404283bbfacb517d614a816763bccf2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 5757dea2aa94..b795f363d004 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -834,6 +834,9 @@ int wiphy_register(struct wiphy *wiphy) sband->channels[i].orig_mpwr = sband->channels[i].max_power; sband->channels[i].band = band; + + if (WARN_ON(sband->channels[i].freq_offset >= 1000)) + return -EINVAL; } for (i = 0; i < sband->n_iftype_data; i++) { |