From: Jeremy Whiting <jeremy.whiting@collabora.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Cc: Edmund Smith <ed.smith@collabora.com>,
Alvaro Soliverez <alvaro.soliverez@collabora.com>
Subject: Re: ios hotspot fix
Date: Mon, 25 Mar 2024 13:11:54 -0600 [thread overview]
Message-ID: <bfb5d799-65bb-412c-be32-3ceea0211968@collabora.com> (raw)
In-Reply-To: <bba319c4-6e65-4809-99d4-90019b89a89e@gmail.com>
Hi James,
On 3/25/24 12:23, James Prestwood wrote:
> Hi Jeremy,
>
> On 3/25/24 10:26 AM, Jeremy Whiting wrote:
>> Hello,
>>
>> In recent testing it has been found that when trying to connect to an
>> ios hotspot some messages are missed by iwd. It seems to be a timing
>> issue, doesn't happen every time, but does happen often enough to be
>> a problem. In testing the device fails to connect more than half of
>> the attempts.
>>
>> Ed Smith has created a patch that seems to fix the problem here. I've
>> attached the patch after rebasing on iwd master.
>>
>> Here's a bit of background and explanation:
>>
>> iwd has difficulty in connecting to iOS hotspots as of 2.7 (and not
>> fixed according to our testing as of 2.16 - latest at the time this is
>> done). This is because of several factors:
>>
>>
>> The iOS hotspot does not repeat its initial EAPOL challenge, where
>> most APs will.
>>
>>
>> The iOS hotspot is not reactive to EAPOL-Start (client request to be
>> challenged); it sends exactly one challenge, and then the connection
>> times out.
>>
>>
>> The iOS hotspot sends its challenge very quickly, more quickly than
>> iwd is prepared for. iwd is not ready to receive the challenge
>> packet before the association event is fired by the kernel's wifi
>> stack, but the iOS hotspot's challenge packet consistently arrives
>> before this.
>>
>>
>> This patch moves iwd's frame listener registration for EAPOL back to
>> the authenticate event fired by the kernel. At this point, the
>> necessary details about what kind of connection we expect to have
>> (e.g. are we an AP) are available, but it's not possible for any
>> plausible EAPOL packet to arrive yet (because authenticate requires us
>> to take action - EAPOL happens after association, which can't happen
>> before we respond to authenticate).
>
> Out of curiosity what client hardware are you using to test this? The
> early frame handling was added to support brcmfmac IIRC and as I
> understand it the EAPoL frame wasn't actually being sent too quickly,
> its just that brcmfmac was sending the events in an unexpected order.
The bug we were experiencing was only on the OLED version of the steam
deck. According to lscpi it uses this wifi chip:
3:00.0 Network controller: Qualcomm Technologies, Inc QCNFA765 Wireless
Network Adapter (rev 01)
DeviceName: Broadcom 5762
Subsystem: Qualcomm Technologies, Inc QCNFA765 Wireless Network
Adapter
Flags: bus master, fast devsel, latency 0, IRQ 77
Memory at 80000000 (64-bit, non-prefetchable) [size=2M]
Capabilities: <access denied>
Kernel driver in use: ath11k_pci
Kernel modules: ath11k_pci
>
> So yes I suppose this could happen. There is even a comment in
> wpa_supplicant which seems to indicate the behavior your talking about:
>
> https://w1.fi/cgit/hostap/tree/wpa_supplicant/wpa_supplicant.c#n5498
>
> Could you resend this using git-send-email so the patch is not an
> attachment. That makes it easier to comment. Looking at the patch the
> first thing that jumps out is you register prior to processing the
> auth event. If there was any failures you would have registered for
> EAPoL unnecessarily. Might as well move the registration until after
> the even was processed successfully.
Ok, I'll get git send-email set up today and update the patch to do the
register after auth is done processing.
Thanks,
Jeremy
>
> Thanks,
>
> James
>
>
>>
>> thanks,
>> Jeremy
next prev parent reply other threads:[~2024-03-25 19:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 17:26 ios hotspot fix Jeremy Whiting
2024-03-25 18:23 ` James Prestwood
2024-03-25 19:11 ` Jeremy Whiting [this message]
2024-03-26 11:33 ` James Prestwood
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=bfb5d799-65bb-412c-be32-3ceea0211968@collabora.com \
--to=jeremy.whiting@collabora.com \
--cc=alvaro.soliverez@collabora.com \
--cc=ed.smith@collabora.com \
--cc=iwd@lists.linux.dev \
--cc=prestwoj@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 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.