diff options
author | Thomas Pedersen <thomas@adapt-ip.com> | 2020-04-30 10:25:52 -0700 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-05-27 10:02:03 +0200 |
commit | 2032f3b2f943256ff40df23182913dfc7e73ec6a (patch) | |
tree | d4d1b50636c75c48b213764a3be32a1d68195a82 /net/mac80211/main.c | |
parent | 942ba88ba9c87f5e225574f1f0d6548f0105ed73 (diff) | |
download | lwn-2032f3b2f943256ff40df23182913dfc7e73ec6a.tar.gz lwn-2032f3b2f943256ff40df23182913dfc7e73ec6a.zip |
nl80211: support scan frequencies in KHz
If the driver advertises NL80211_EXT_FEATURE_SCAN_FREQ_KHZ
userspace can omit NL80211_ATTR_SCAN_FREQUENCIES in favor
of an NL80211_ATTR_SCAN_FREQ_KHZ. To get scan results in
KHz userspace must also set the
NL80211_SCAN_FLAG_FREQ_KHZ.
This lets nl80211 remain compatible with older userspaces
while not requring and sending redundant (and potentially
incorrect) scan frequency sets.
Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20200430172554.18383-4-thomas@adapt-ip.com
[use just nla_nest_start() (not _noflag) for NL80211_ATTR_SCAN_FREQ_KHZ]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 06c90d360633..ac74bd780b42 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -596,6 +596,8 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211); wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH); + wiphy_ext_feature_set(wiphy, + NL80211_EXT_FEATURE_SCAN_FREQ_KHZ); if (!ops->hw_scan) { wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN | |