From: James Prestwood <prestwoj@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
KeithG <ys3al35l@gmail.com>,
linux-wireless@vger.kernel.org
Subject: Re: brcmfmac AP mode
Date: Wed, 14 Feb 2024 11:31:07 -0800 [thread overview]
Message-ID: <4eda39b4-3b16-4f01-a241-50409d34ce33@gmail.com> (raw)
In-Reply-To: <311c594bddde32bacd45acbfa6f40fa7670e51c6.camel@sipsolutions.net>
Hi Johannes,
On 2/14/24 6:34 AM, Johannes Berg wrote:
> I have no experience with brcmfmac, but ...
>
>> I was helping Keith out here and wanted to provide a bit more
>> information. I found there were a few differences between IWD and
>> wpa_supplicant related to scanning which may aid in figuring out why
>> brcmfmac is behaving this way:
>>
>> - IWD scans using the wdev ID where wpa_supplicant uses ifindex. Not
>> sure if this has anything to do with the difference behavior.
> This is not even visible to the driver, it's entirely resolved in
> nl80211, so no impact here.
>
>> - Passive scans (which IWD prefers) seem to exacerbate the behavior.
>> Simple testing using "wpa_cli scan" showed wpa_supplicant was only using
>> active scans. I also tested with iw and saw repeatable disconnects when
>> passive scanning. Disconnects while using active scans (using iw) were
>> much less frequent.
> This makes sense, especially if it's __ap rather than __p2p_go type,
> since it *has* to be off the channel for some time -- especially for
> passive scans it has to be off-channel for more than a typical interval
> to even do scanning correctly.
>
>> - Scanning with IWD, wpa_supplicant, or iw, passive or active, always
>> resulted in beacon loss for clients connected to the AP. This was 100%
>> guaranteed. The clients just could recover when active scans were used
>> over passive. But either way this does not seem like normal behavior,
>> the AP interface should still be beaconing on its active channel during
>> a scan right?
> That's "normal" in the sense that you have to be off the channel for
> scanning, and if you're off the channel you can't transmit beacons on
> it?
>
> For P2P GO rather than AP it should publish NoA descriptors in the
> beacon to let clients know there won't be a beacon.
>
> Now it's perhaps possible to time - especially active - scanning so you
> can still beacon somewhat and inbetween, but I suppose the firmware
> doesn't do that here.
>
> In fact even outside of the beaconing, APs aren't expected to be off-
> channel, clients can send data to them after all. Again P2P GO solves
> that with NoA, but the spec itself has no good way to solve this and I'm
> not even sure it would even want to.
>
> In any case, you could argue that starting AP and client and then
> scanning is pretty much _asking_ for trouble.
Yes I suspected as much. It seems some firmware is just better at this
than others. There is one use case there that I believe Kieth is
targeting and that is new device onboarding which I'm sure your familiar
with as just about every "smart" device uses it. Where the new devices
starts an AP and your phone/App connects and provides credentials to the
"real" network. The tricky part is having the new device scan for
available networks while it has a client connected. Some drivers support
AP scanning which maybe is really what should be used for this? Maybe
that is optimized to actually work.
I guess I'll also ask, what _is_ the target use case for STA + AP
interfaces running concurrently? If scanning is unreliable then
connecting would also be most likely? so what can you actually do here?
>> If this isn't possible or can't be done reliably then
>> should the interface combinations be changed to disallow concurrent sta
>> + AP mode interfaces?
> Maybe it could restrict it to P2P GO instead of AP? But then people will
> anyway just notice that they can use P2P GO and connect arbitrary
> clients to it (not just P2P client), then those clients won't honour the
> NoA because they're not P2P, and then you're back to the exact same
> situation...
> johannes
next prev parent reply other threads:[~2024-02-14 19:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 1:36 brcmfmac AP mode KeithG
2024-02-14 14:13 ` James Prestwood
2024-02-14 14:34 ` Johannes Berg
2024-02-14 19:31 ` James Prestwood [this message]
2024-02-14 20:12 ` Johannes Berg
2024-02-15 9:17 ` Nicolas Escande
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4eda39b4-3b16-4f01-a241-50409d34ce33@gmail.com \
--to=prestwoj@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=ys3al35l@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).