commit 70fc6ea262865d485f698ac18319c1abd2b5dd0c
parent be2e1faa31c27703c9a443a807c5e1de2eff21a2
Author: James Prestwood <prestwoj@gmail.com>
Date: Mon, 28 Feb 2022 10:49:36 -0800
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.
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/scan.c b/src/scan.c
@@ -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);
diff --git a/src/scan.h b/src/scan.h
@@ -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;