scan: add support for scanning on AP interface type

This adds a new flag, force_ap to the scan parameters. When enabled
this will set NL80211_SCAN_FLAG_AP.
This commit is contained in:
James Prestwood 2022-02-28 10:49:36 -08:00 committed by Denis Kenzior
parent be2e1faa31
commit 70fc6ea262
2 changed files with 4 additions and 0 deletions

View File

@ -391,6 +391,9 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc,
NL80211_EXT_FEATURE_SCAN_RANDOM_SN))
flags |= NL80211_SCAN_FLAG_RANDOM_SN;
if (params->ap_scan)
flags |= NL80211_SCAN_FLAG_AP;
if (flags)
l_genl_msg_append_attr(msg, NL80211_ATTR_SCAN_FLAGS, 4, &flags);

View File

@ -98,6 +98,7 @@ struct scan_parameters {
bool randomize_mac_addr_hint : 1;
bool no_cck_rates : 1;
bool duration_mandatory : 1;
bool ap_scan : 1;
const uint8_t *ssid; /* Used for direct probe request */
size_t ssid_len;
const uint8_t *source_mac;