Content-Type: multipart/mixed; boundary="===============5813525051785068143==" MIME-Version: 1.0 From: James Prestwood To: iwd at lists.01.org Subject: [PATCH 4/7] scan: add support for scanning on AP interface type Date: Tue, 22 Feb 2022 14:57:15 -0800 Message-ID: <20220222225718.2485794-4-prestwoj@gmail.com> In-Reply-To: 20220222225718.2485794-1-prestwoj@gmail.com --===============5813525051785068143== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This adds a new flag, force_ap to the scan parameters. When enabled this will set NL80211_SCAN_FLAG_AP. --- src/scan.c | 4 ++++ src/scan.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/scan.c b/src/scan.c index 12b7a3fd..01056634 100644 --- a/src/scan.c +++ b/src/scan.c @@ -391,6 +391,10 @@ static struct l_genl_msg *scan_build_cmd(struct scan_c= ontext *sc, NL80211_EXT_FEATURE_SCAN_RANDOM_SN)) flags |=3D NL80211_SCAN_FLAG_RANDOM_SN; = + if (params->force_ap && wiphy_has_feature(sc->wiphy, + NL80211_FEATURE_AP_SCAN)) + flags |=3D 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 index 2c401df6..7ad50e5d 100644 --- 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 force_ap : 1; const uint8_t *ssid; /* Used for direct probe request */ size_t ssid_len; const uint8_t *source_mac; -- = 2.34.1 --===============5813525051785068143==--