nl80211_trigger_scan() processes scan request netlink attributes, defined in enum nl80211_attrs, and fills struct cfg80211_scan_request *request. Currently there is no logic to fill this member: enum nl80211_bss_scan_width scan_width; We have a requirement to fill this member for drone use cases, in which drone controller needs to scan and connect to drone in 5 MHz or 10 MHz channel width (may support other channel widths lower than 20 MHz later). Unfortunately there is not an existing attribute in enum nl80211_attrs that has enum nl80211_bss_scan_width semantics. The only attribute which has those semantics is NL80211_BSS_CHAN_WIDTH in enum nl80211_bss, and of course we can't mix attributes from different enums in a netlink command, at least not at the same nesting level. enum nl80211_attrs does define another attribute, NL80211_ATTR_CHANNEL_WIDTH, but it has enum nl80211_chan_width semantics. In order to support the requirement to fill the scan_width with an enum nl80211_bss_scan_width value we seem to have two options: 1) Use NL80211_ATTR_CHANNEL_WIDTH and convert from enum nl80211_chan_width semantics to enum nl80211_bss_scan_width semantics when filling struct cfg80211_scan_request *request. 2) Introduce a new NL80211_ATTR_SCAN_CHANNEL_WIDTH attribute to enum nl80211_attrs that has enum nl80211_bss_scan_width semantics. The following series of patches is the implementations of above two options. In order to make them a series, a revert patch is included, which can be ignored. Please review and decide which option is more reasonable and acceptable. Xinyue Ling (4): nl80211: Add 4/8/16 MHz BSS control channel width definitions wifi: nl80211: Add support to specify channel width for scan (option 1) Revert "wifi: nl80211: Add support to specify channel width for scan (option 1)" wifi: nl80211: Add support to specify channel width for scan (option 2) include/net/cfg80211.h | 6 ++++++ include/uapi/linux/nl80211.h | 34 ++++++++++++++++++++++++++++++++-- net/wireless/nl80211.c | 14 ++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) -- 2.25.1