Repository navigation
wifi: mt7932: WPA2 PMF on the PSK AKM, and connect right after a cancelled scan - #784
Merged
Merged
Conversation
iwd and NetworkManager could not join a WPA2-Personal network that offers PMF with the plain PSK AKM (00-0f-ac:2), the common router setting for optional PMF and for many required-PMF setups. Once a client has negotiated MFPC with such an AP it asks for NL80211_MFP_REQUIRED, and the driver refused PSK with required MFP, so the connect failed before any frame was sent. Because BIP-CMAC-128 is advertised, iwd 3.12 negotiates PMF on every MFPC network and hit this on all of them. The firmware sets MFPC itself on the AKM 2 arm and negotiates PMF with any AP that sets MFPC; no request field selects it. Accept every MFP setting for AKM 2 and decide at admission from the AP's RSN element: a request for PMF needs an MFPC AP, a request with MFP disabled cannot join an AP that sets MFPR, and the admitted PMF state follows the AP's MFPC bit. Tested on J700 against hostapd 2.12 on an MT7925, with iwd 3.12 and with NetworkManager 1.58 and wpa_supplicant 2.11. WPA2-PSK with optional PMF and with required PMF now joins with PMF on (hostapd lists the station with MFP and AKM 00-0f-ac:2), where both supplicants failed before. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
wpa_supplicant cancels its scan just before it connects. The firmware ends the cancelled batch a moment later, and until then the driver refused the connect with -EBUSY. The supplicant then put the BSS on its ignore list for 10 s, so NetworkManager joins took 5 to 10 s longer than they should, and some timed out as "network could not be found". Wait, bounded at 2 s, for the cancelled batch to end before admitting the connect, the same way an address change already waits for one. A scan that is still running is not touched and still refuses the connect. A KUnit case covers a late end, a batch that never ends and a running scan. Tested on J700 with NetworkManager 1.58 and wpa_supplicant 2.11. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
notmysegv
pushed a commit
to notmysegv/linux
that referenced
this pull request
Nov 4, 2026
…tion/aurora Bring integration/aurora up to aurora-wip 52f0a6b, the source of 7.3.0-aurora-fleet14h, promoted on all four machines on 2026-11-02. The range also covers the fleet14g source b35adc7. It adds aurora-silicon#792, aurora-silicon#750, aurora-silicon#783, aurora-silicon#784, aurora-silicon#793, aurora-silicon#774, aurora-silicon#794, aurora-silicon#796, aurora-silicon#798, aurora-silicon#800, aurora-silicon#802 and aurora-silicon#801. No conflicts. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are two gaps the Neo's MT7932 Wi-Fi still had with WPA2 and WPA3 networks, found by a full matrix with iwd 3.12, NetworkManager 1.58 and wpa_supplicant 2.11 against hostapd 2.12 access points.
WPA2 with PMF on the PSK AKM. iwd and NetworkManager couldn't join a WPA2-Personal network that offers PMF with the plain PSK AKM (00-0f-ac:2). That's the usual router setting for optional PMF, and many routers use it for required PMF too. Once a client has negotiated MFPC it asks for NL80211_MFP_REQUIRED, and the driver refused PSK with required MFP. The firmware sets MFPC itself on the AKM 2 arm, so the driver now accepts every MFP setting there and decides at admission from the AP's RSN element.
Connect right after a cancelled scan. wpa_supplicant cancels its scan just before it connects, and the driver refused the connect with -EBUSY until the firmware ended the cancelled batch. The supplicant then ignored the BSS for 10 s, so NetworkManager joins took 5 to 10 s longer, and some failed as "network could not be found". The connect now waits, bounded at 2 s, for that batch to end, the same way an address change already does.
Testing
Gates on 7caf462: W=1 for the mt7932 directory gives 0 warnings with clang and with GCC. mt7932 KUnit 75/75, including the new mt_scan_connect_settle_test.
Neo (J700) results for the PMF fix, both supplicants, against hostapd on an MT7925. One row is one join, a 4-ping check and a hostapd station dump.
"After" means fleet14c with this driver, and again on the omacom-sync candidate kernel (PR 783), where iwd PMF-optional, iwd PSK-only PMF-required and NM PSK-only PMF-required pass too. On that kernel, roaming between two PMF-required SAE access points passes both ways with iwd and with NetworkManager, with 0% ping loss.
Both commits together, as a module on fleet14d (Neo boot aaeb6865), 21:54-22:02. Rows: iwd PMF optional, iwd PSK-only PMF required, NM PMF optional, NM PSK-only PMF required, NM WPA3 transition, NM OWE, NM pmf=disable against PMF optional. All joined with 0% ping loss and no CONNECT_REFUSED, and none of the supplicant logs had an "ignore list" entry. NM joins now complete 11 to 23 s after the AP starts. Before the fix, an omacom-sync kernel row showed the -EBUSY refusal and a 10 s ignore.
One gap remains and isn't fixed by this PR. In about 1 NM row in 5, NetworkManager never sees a freshly started test AP on channel 36 for 20 s, and the next try joins. None of that scan's results include channel 36 at all, while the other bands are fine. It's under investigation as a separate issue.
After #783 merged, aurora-wip 49b58bc was merged into this branch. The only conflict was the connect entry in link.c, where the roam move now comes first and the wait for a cancelled scan goes right after it, just before the admission lock. On that head (6401c1f): W=1 0 warnings with clang and GCC, mt7932 KUnit 80/80 (the roam move suite plus mt_scan_connect_settle_test), run-host-tests 161/161.
🤖 Generated with Claude Code