Skip to content

wifi: mt7932: join WPA2-PSK APs with a TKIP group key - #400

Merged
scottjones merged 2 commits into
omacom:integration/aurorafrom
zoan37:wifi/mt7932-tkip-group
Nov 8, 2026
Merged

scottjones merged 2 commits into
omacom:integration/aurorafrom
zoan37:wifi/mt7932-tkip-group

Conversation

@zoan37

@zoan37 zoan37 commented Nov 7, 2026 •

Copy link
Copy Markdown

Fixes #398.

An AP in WPA/WPA2 mixed mode advertises a TKIP group cipher with CCMP and TKIP pairwise. On J700, iwd refuses it with NotSupported before any association attempt, because the driver lists only CCMP. It looks like a wrong password, while macOS joins the same AP.

The firmware owns the handshake and the keys, so this registers TKIP and accepts it as the group cipher for WPA2-PSK. Pairwise TKIP, WPA1, and a TKIP group with SAE or OWE stay refused.

The open question from #398 still applies: the driver rejected TKIP group keys on purpose, and I don't know why. If there's a firmware or receive-path reason, this one AP wouldn't show it.

Testing

Runtime, on J700 with this driver code built at 747e84f, against one router, on both its networks:

Action Result
Join 5 GHz (VHT80, 526 Mbit/s RX) pass
Join 2.4 GHz (20 MHz, 104 Mbit/s RX) pass
Gateway and internet ping, no loss, on both pass
DNS pass
Group traffic: mDNS discovery of other LAN devices, ARP, on both pass
Bluetooth alongside the patched module pass
Kernel log errors from the driver none in a short session

Not tested: other APs, group rekeying over a long session, suspend/resume, roaming.

Tests

  • Adds mt_connect_auth_test cases for PSK with a TKIP group, the refused combinations above, and OWE. The existing "TKIP group" case goes through SAE and still rejects, so it's renamed "SAE TKIP group".
  • KUnit itself wasn't run. association-test.o compiles. I ran the real mt_connect_auth_test table and switch against the real mt7932_connect_auth() in a userspace harness with stubbed types: 49 cases pass, and the two that expect a TKIP group to succeed fail on the old check. This needs a maintainer to apply ci:build for the full run.
  • checkpatch.pl --strict: no errors. Its warnings are about the commit trailers.

Assisted by an LLM, as the commit trailer says. The runtime results are from my own Mac.

🤖 Generated with Claude Code

An AP in WPA/WPA2 mixed mode offers CCMP and TKIP pairwise ciphers with a
TKIP group cipher. The driver registers only CCMP, so iwd refuses the BSS
with NotSupported before any association attempt, and the failure looks
like a wrong password.

The firmware runs the handshake and owns the keys, and it joined such an
AP and passed unicast and group traffic with no other change. Register
TKIP and accept it as the group cipher for WPA2-PSK. Pairwise TKIP, WPA1,
and a TKIP group with SAE or OWE stay refused.

Tested on J700 against one AP's 5 GHz network: gateway and internet
traffic, DNS, and mDNS discovery of other LAN devices through the group
key.

Link: omacom#398
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: zoan37 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for chasing this down. A mixed-mode AP failing like a wrong password is a nasty one for users, so it's good to have it fixed.

The admission check is nicely narrow. Only WPA2-PSK with CCMP pairwise and a TKIP group key gets through (association.h, lines 22-41), while pairwise TKIP, WPA1, and a TKIP group with SAE or OWE stay refused. The new test cases fail when the check is changed, which is what I wanted to see.

Two things before merge:

1. Group rekey evidence. This is the case I'm most worried about. If firmware mishandles the TKIP group key when the AP rotates it, unicast keeps working but broadcast stops quietly after the first group rekey. That breaks ARP, DHCP renewal, mDNS and IPv6 router advertisements. Could you:

  • lower the AP's group key (GTK) rekey interval,
  • stay connected past at least one rekey,
  • rerun the ARP and mDNS checks,
  • and post the results here?

2. Docs. Documentation/networking/device_drivers/wifi/mt7932-neo.rst isn't touched by this PR and is now out of date. Line 99 says the driver advertises PSK and SAE "with CCMP only", and lines 125-126 say "additional ciphers are not advertised". Both need updating for the TKIP group case. Line 146 (OWE with CCMP) is still right.

One note while you're in the docs, not a blocker: firmware runs the 4-way handshake, so the host has no KCK, and calling cfg80211_michael_mic_failure() from the driver wouldn't do anything. Could you add a sentence saying MIC failure reporting and TKIP countermeasures are left to firmware and haven't been verified?

We're also testing this on a Neo on our side and will follow up with results.

The station security notes still say CCMP only. Describe what the driver
accepts, and record that MIC failure reporting and TKIP countermeasures
are left to firmware and have not been verified.

Link: omacom#398
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: zoan37 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zoan37

zoan37 commented Nov 7, 2026

Copy link
Copy Markdown
Author

Both items are done. The doc update is pushed: mt7932-neo.rst no longer says CCMP only, and it now says MIC failure reporting and TKIP countermeasures are left to firmware and haven't been verified. Rekey results below.

Group rekey results. J700 with the patched driver, against hostapd 2.12 on a second laptop (Intel 4d40, channel 6, wpa=3, wpa_pairwise and rsn_pairwise both CCMP TKIP, wpa_group_rekey=60). The Neo logged group cipher TKIP, pairwise CCMP.

Stayed connected for 843 s through 14 of 14 completed group key handshakes, 60 s apart. Every ~3 s the AP flushed its neighbour entry for the Neo and pinged it, and sent a numbered mDNS packet. mDNS was captured on the Neo at wlan0.

Check Result
Broadcast ARP plus ping round trips while joined 278/278
Numbered mDNS received 278/279, no duplicates
Group traffic in every interval after a rekey yes, 14/14, first frame within 2.9 s
Largest gap in group traffic 4.0 s
Unicast pings from the Neo 280/280
Driver errors in the kernel log none

The missing mDNS packet was sent about 2 s before the Neo left, 42 s after the last rekey, and the ARP from that cycle succeeded, so I attribute it to the capture stopping.

I used a test AP so the router could stay unchanged, so this isn't a commercial AP's own rekey. Also not tested: DHCP renewal and IPv6 RAs (static addressing, IPv6 off), rekeying over hours, and MIC failure handling.

Also rejoined the router normally after an overnight suspend, as a single observation.

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround, and for the rekey numbers. The doc fix to mt7932-neo.rst and the rekey evidence cover both things I asked for.

As promised, here's what we saw on a MacBook Neo in our Mac lab, on a kernel built from eb6549c (your latest push only touches the doc, so the code is the same):

  • AP: hostapd 2.12 on an ath10k card, channel 36, wpa=2, rsn_pairwise CCMP TKIP, so a TKIP group key with CCMP pairwise, rekeying every 120 s.
  • The Neo joined and stayed connected through 9 group rekeys across two runs (4, then 5), all completed per hostapd.
  • With the AP sending a numbered broadcast every 2 s, the Neo received 301 of 301 over 10 minutes and about 5 rekeys, with no gap over 2.0 s. Unicast pings passed 20 of 20 and 13 of 13.
  • Control: the same Neo on the stock 7.2.11 kernel saw the network but never associated, which matches #398.
  • On a normal CCMP-only network the #400 kernel passed a 5-minute soak with no new driver errors.

We didn't test DHCP renewal, IPv6 RAs, commercial-AP rekeys, long runs or MIC failure either, so those are still open on both sides.

On TKIP itself: with a TKIP group key, broadcast and multicast frames only get TKIP's older protection, but that's the access point's choice and every other client on it has the same exposure; the alternative for these users is no connection. It doesn't open a downgrade against CCMP-only access points. The remaining gap is firmware's MIC countermeasures, which the doc already marks as unverified.

KUnit hasn't run on this PR yet (CI ran checks only), so the merge queue's full build is still the gate for the new connect tests.

@scottjones
scottjones added this pull request to the merge queue Nov 8, 2026
Merged via the queue into omacom:integration/aurora with commit 49a8c15 Nov 8, 2026
14 checks passed
JeppeBylov pushed a commit to JeppeBylov/linux-aurora that referenced this pull request Nov 11, 2026
Bring drivers/gpu/drm/asahi up to the aurora-silicon/linux state at
d3cf19b, the base of the G17 performance series that follows, merged
three-way on top of integration/aurora with the 7.2.10 merge point
44d5afc as base. integration/aurora's own work is kept: the G15 backend,
the M3 T8122 runtime, UAT adoption, deferred-close binding sequences (omacom#214)
and the 7.2.11 shared-code adaptations. The G16 (T8132) backend is not
carried.

This carries the G17 work merged on the aurora side since 7.2.10,
including the T6040 (M4 Pro) and 25G83 firmware support and the render
replay/recovery series by Jonathan Goyvaerts, the watchdog, replay and
backing-population changes by Ryan Murray, the tracked VM lifetime work by
Eryk Wieliczko, and the G17 queue, capacity and timestamp changes by
DjDeveloperr (aurora-silicon/linux omacom#382, omacom#391, omacom#397, omacom#400).

Adaptations to 7.2.11:
- module parameters return references; THIS_MODULE replaces
  kernel::module::this_module; a local raw_try_init replaces the newer
  pin-init helper; of_device_table! takes the MODULE_OF_TABLE name.
- regs.rs keeps G17's sgx window as Devres<IoMem>, as 7.2 has no
  DevresIoMem.
- The shared feature flags keep G17's opt-out of soft faults.
- G15 and the M3 runtime use the shared timestamp::Buffer and the
  reserved-table aware root walk; omacom's G15 vm_closed hook becomes
  vm_destroyed, next to the G17 vm_closed.
- Crate and helper pieces the driver needs: the shmem SG lease and
  pages_no_reclaim (drm_gem_shmem_helper), DRM file memory stats, fdinfo
  and is_current_master, and the mm RSS counter.

Signed-off-by: DjDeveloperr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

j700 (MacBook Neo): mt7932 refuses WPA2-PSK APs with a TKIP group key (WPA/WPA2 mixed mode)

2 participants