Repository navigation
Conversation
Without the host power state the Alpha firmware treats the host as asleep, powers the PHYs down and traps (PHY5G irq_isr.c:105, PHY2G power_manager.c:394, and in a log with a post-join frame also LMAC2G "PMGR - Assert while waiting"). Before the first join of a firmware boot, send command 6 with a zero body (host power state awake), command 43 (packet lifetime) and command 52 (control profile). The host_setup parameter (default on) turns this off. Measured on a Mac mini M6 (J873), WPA2-PSK, 5 GHz: the firmware stayed alive (stage 2) for the whole test, about 17 minutes connected; before, it trapped within 15 s in 14 of 14 variants. A 600 s iperf3 at 20 Mbit/s moved 1.40 GBytes without a stall. On a MacBook Pro M5 Max (J716c) the same firmware family trapped after hours instead of seconds: overnight, the Alpha stage left 2, a country command lost its transport, and Wi-Fi stayed down until reboot. This driver sends none of the three commands either. [Erik: ported from the J813/J873 N1 driver (linux-aurora 1242f12e876b) to the T6050 APIF driver. That driver also has tx_config debugfs files whose applied defaults this skips; this one has none, so each command is sent once per firmware boot and retried on the next join if it fails.] Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Developed with Claude Code. Signed-off-by: Erik Bourget <erik@ebourget.net>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approved: the change works on the M5 Pro (J714sAP, T6050), bare metal. It belongs in a different file now.
Since #938 the T6050 transport is centauri/t6050/centauri_wifi.c, and that copy doesn't send these commands. On integration, centauri/centauri_wifi.c (the file this PR changes on t6050/centauri-wifi) is the J813/J873 driver, which already has them. So I applied the same change to the T6050 file in #1316, stacked on #938, and tested that:
- Before the first join:
host power state awake: rc=0 status=0,TX packet lifetime defaults: rc=0,TX control profile defaults: rc=0. Then WPA2-PSK on 5 GHz connects, gets DHCP and passes traffic. - The commands sent right before a join, late in a healthy boot (load with
host_setup=0, join, sethost_setup=1, rejoin), didn't disturb that join. It connected on the first attempt. host_setup=0turns them off.
Not tested: the overnight soak (the trap took hours on J716c). #1316 can replace this PR once #938 lands; this branch doesn't build on its own, as the description says.
…ore a join Without the host power state the N1 Alpha firmware treats the host as asleep, powers the PHYs down and traps. Before the first join of a firmware boot, send command 6 with a zero body (host power state awake), command 43 (packet lifetime) and command 52 (control profile). Each is sent once per firmware boot and retried at the next join if it fails. The host_setup parameter (default on) turns this off. This is Joshua Warren's fix from the J813/J873 N1 driver (linux-aurora 1242f12e876b), which Erik Bourget ported to the T6050 driver as #828. #828 targets t6050/centauri-wifi's centauri/centauri_wifi.c; with the T6050 transport now in centauri/t6050/, the same change goes here. Signed-off-by: Diljit Singh <hey@djdev.me>
|
Closing: the same host-awake change is merged for the T6050 driver as #1316 (008cc8a). Since #938, the T6050 transport lives in 🤖 Generated with Claude Code |
The N1 Wi-Fi firmware on the M5 Max (J716c) can trap after a few hours connected. Its Alpha stage leaves its running state, a country command then loses its transport, and Wi-Fi stays down until reboot. The firmware treats a host that hasn't sent it a host power state as asleep: it powers the PHYs down and traps. This driver never sends one.
This is Joshua Warren's fix from the J813/J873 N1 driver, ported to the T6050 driver:
host_setupmodule parameter (default on) turns this off.Testing
host power state awake: rc=0 status=0, and Wi-Fi works. A long soak hasn't been done, so the overnight trap isn't confirmed fixed.t6050/centauri-wifidoesn't build on its own.centauri_wifi.cthere redefinescentauri_alpha_irq,centauri_wifi_registerandcentauri_wifi_unregisterwithout the Kconfig and header fromt6050/centauri-core, with or without this commit. The samecentauri_wifi.cbuilds W=1-clean in the J716c kernel, where centauri-core and centauri-wifi are combined.--strict: one warning, a 76-character line in the original commit description.A stacked follow-up sends the host power state again after suspend-to-idle.
Created with Claude Opus 5.5 in Claude Code.