diff options
author | Tova Mussai <tova.mussai@intel.com> | 2017-08-05 11:44:38 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-09-21 11:41:59 +0200 |
commit | ffa4629e0c2b8b015f5fa174149c6dd269b4142c (patch) | |
tree | 530253b015d6a23bd4cf54a9ed9c5f24aa01d447 /drivers/fmc | |
parent | a7f26d8050c4f172d2dc523aabf45c5cbd9558ac (diff) |
nl80211: return error for invalid center_freq in 40 MHz
When NL80211_ATTR_WIPHY_CHANNEL_TYPE is given, nl80211 would parse the
channel definition the old way, discarding NL80211_ATTR_CENTER_FREQ1,
NL80211_ATTR_CENTER_FREQ2 etc. However, it is possible that user space
added both NL80211_ATTR_WIPHY_CHANNEL_TYPE and NL80211_ATTR_CENTER_FREQ1
or NL80211_ATTR_CENTER_FREQ2 assuming that all settings would be honored.
In such a case, validate that NL80211_ATTR_CENTER_FREQ1 and
NL80211_ATTR_CENTER_FREQ2 values match the channel configuration,
as otherwise user space would assume that the desired configuration was
applied.
For example, when trying to start ap with
NL80211_ATTR_WIPHY_CHANNEL_TYPE = NL80211_CHAN_HT40MINUS,
NL80211_ATTR_WIPHY_FREQ = 5180 and NL80211_ATTR_CENTER_FREQ1 = 5250
without this fix, the ap will start on channel 36 (center_freq1 will be
corrected to 5180). With this fix, we will throw an error instead.
Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/fmc')
0 files changed, 0 insertions, 0 deletions