* Re: [PATCH 4/7] scan: add support for scanning on AP interface type
@ 2022-02-24 16:44 James Prestwood
0 siblings, 0 replies; 3+ messages in thread
From: James Prestwood @ 2022-02-24 16:44 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]
Hi Denis,
On Wed, 2022-02-23 at 12:50 -0600, Denis Kenzior wrote:
> Hi James,
>
> On 2/22/22 16:57, James Prestwood wrote:
> > 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_context *sc,
> > NL80211_EXT_FEATURE_SCAN_RA
> > NDOM_SN))
> > flags |= NL80211_SCAN_FLAG_RANDOM_SN;
> >
> > + if (params->force_ap && wiphy_has_feature(sc->wiphy,
> > + NL80211_FEATURE_AP_
> > SCAN))
>
> You already check this in patch 5 ap_dbus_scan()?
With this newfound knowledge that brcmfmac doesn't advertise this
feature I think we do still want this here. I did test on brcmfmac
without this check and it accepted the scan request still but I think
it would be safer to keep it.
>
> > + 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
> > 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;
>
> force_ap_scan? or simply ap_scan?
>
> > const uint8_t *ssid; /* Used for direct probe request */
> > size_t ssid_len;
> > const uint8_t *source_mac;
> >
>
> Regards,
> -Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/7] scan: add support for scanning on AP interface type
@ 2022-02-23 18:50 Denis Kenzior
0 siblings, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2022-02-23 18:50 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
Hi James,
On 2/22/22 16:57, James Prestwood wrote:
> 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_context *sc,
> NL80211_EXT_FEATURE_SCAN_RANDOM_SN))
> flags |= NL80211_SCAN_FLAG_RANDOM_SN;
>
> + if (params->force_ap && wiphy_has_feature(sc->wiphy,
> + NL80211_FEATURE_AP_SCAN))
You already check this in patch 5 ap_dbus_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
> 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;
force_ap_scan? or simply ap_scan?
> const uint8_t *ssid; /* Used for direct probe request */
> size_t ssid_len;
> const uint8_t *source_mac;
>
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 4/7] scan: add support for scanning on AP interface type
@ 2022-02-22 22:57 James Prestwood
0 siblings, 0 replies; 3+ messages in thread
From: James Prestwood @ 2022-02-22 22:57 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
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_context *sc,
NL80211_EXT_FEATURE_SCAN_RANDOM_SN))
flags |= NL80211_SCAN_FLAG_RANDOM_SN;
+ if (params->force_ap && wiphy_has_feature(sc->wiphy,
+ NL80211_FEATURE_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
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-24 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 16:44 [PATCH 4/7] scan: add support for scanning on AP interface type James Prestwood
-- strict thread matches above, loose matches on Subject: below --
2022-02-23 18:50 Denis Kenzior
2022-02-22 22:57 James Prestwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.