]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: support scan frequencies in KHz
authorThomas Pedersen <thomas@adapt-ip.com>
Thu, 30 Apr 2020 17:25:52 +0000 (10:25 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 27 May 2020 08:02:03 +0000 (10:02 +0200)
commitde97a1171facba701d829a1bbcd6a1c160417a56
treed4d1b50636c75c48b213764a3be32a1d68195a82
parent3ae9a11faa1c0606804b4a42356a00a0cd08e84e
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>
include/uapi/linux/nl80211.h
net/mac80211/main.c
net/wireless/nl80211.c