Repository navigation
wifi: apple: centauri: t6050: return -EALREADY to a connect while connected - #3954
Conversation
…nected The firmware has no in-place reassociation, so a connect while connected was refused with -EBUSY. For a roam, wpa_supplicant then marks the target BSS as failed, drops the link, ignores the target for 10 s and joins whatever else is in the scan, often a weaker AP. On a K116s it roamed from a -58 dBm AP to one at -63 dBm this way and stayed there. Return -EALREADY instead. wpa_supplicant handles that by disconnecting explicitly and retrying the same BSS, so a roam becomes a short disconnect and join to the BSS it chose. wifi_disconnect() waits for the firmware to finish, so the retried connect is not refused as busy. Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
left a comment
There was a problem hiding this comment.
Code audit at 019e4b0e0946 (drivers/net/wireless/apple/centauri/t6050/centauri_wifi.c) looks clean:
- Splitting
wifi->connectedout of the-EBUSYcheck inwifi_connect()to return-EALREADYcleanly instructswpa_supplicantto disconnect viawifi_disconnect()and retry the target BSS without hitting the 10 s ignore list, while leaving!wifi->configured,wifi->connecting,wifi->scan_request, andwifi->disconnect_pendingunchanged (-EBUSY). - DCO, checkpatch
--strict,centauri-*-tests.py, and K116s roam verification all look solid (minor note: this is effectively a two-way revertible change).
Waiting on queued CI (apple-build, host-tests, KUnit plan, pr-text) and exact-head T6050 verification before flipping to approve.
|
Exact-head M5 Max (
Scope: directly exercises the |
satchlj
left a comment
There was a problem hiding this comment.
Reviewed 019e4b0e0946 (wifi: apple: centauri: t6050: return -EALREADY to a connect while connected):
- Single-site change in
drivers/net/wireless/apple/centauri/t6050.cmaps a duplicatewifi_connect()while already connected from-EBUSYto-EALREADY, matchingcfg80211_connect()expectations without touching unrelated connect/disconnect paths. - All CI checks (
apple-build,host-tests,KUnit plan,pr-text,readiness) are now green, DCO andRisk:are present, and exact-head hardware verification landed on both M5 Max (J775c,T6050A/B-EBUSY->-EALREADYpre- and post-2/2s2idlewith 0 faults) andK116s(roam recovery PASS).
LGTM.
DjDeveloperr
left a comment
There was a problem hiding this comment.
I read the whole diff at 019e4b0e. A connect while the interface is already connected now returns -EALREADY instead of -EBUSY. That is the same code cfg80211 returns for a connect while connected. wpa_supplicant's nl80211 driver handles -EALREADY by disconnecting and retrying the same BSS.
The retry works with this driver: wifi_disconnect() waits for the firmware to finish the disconnect, so disconnect_pending is already clear when the second connect arrives. The other busy cases (not configured, connecting, scanning, disconnect in progress) still return -EBUSY.
satchlj's J775c row at this head shows -EALREADY before and after s2idle, with the link up and pings clean. Approving.
Problem
The T6050 driver refused a connect while connected with -EBUSY. wpa_supplicant roams by sending a connect with
prev_bssid, so every roam failed: it dropped the link, ignored the target for 10 s and joined whatever else the scan held. On a K116s this moved it off a -58 dBm AP onto a -63 dBm one, where it stayed with bursty loss (6-14% of gateway pings in 20-30 s runs):Change
Return -EALREADY when already connected. wpa_supplicant handles that by disconnecting explicitly and retrying the same BSS.
wifi_disconnect()waits for the firmware, so the retried connect is not refused as busy. Joins, disconnects and the other busy cases are unchanged. A roam is still a short disconnect and join, not a firmware reassociation.Tested: K116s, firmware 27.2.
Risk: one-way · T6050 Wi-Fi (
apple_centauri_t6050), roaming only.Testing
K116s (MacBook Pro 16-inch M5 Pro, firmware 27.2), aura
main7f5a1df5, default command line. Kernel:main8a42aee + #2355 + both centauri fixes (this one unchanged), ATC0 left out locally (#3598); the module was swapped in and reloaded withmodprobe -r btcentauri_t6050 apple_centauri_t6050; modprobe apple_centauri_t6050. Counts: 0 oops/WARN, 0 new kernel errors besides the one probe line below, 1 failed unit (anacron start limit on AC plug-in, also without these patches), no SELinux on Debian.wpa_cli roamto another BSS of the same network gives the log above and lands on a third BSS.wpa_cli roamboth ways between two 5 GHz BSSes (ch 48 and ch 60): associated with the requested BSS in 0.6-0.7 s, no ignore-list entry, same DHCP lease, 0/50 gateway pings lost afterwards.tools/asahi/centauri-*-tests.pypass; checkpatch --strict clean.Still to run
A roam triggered by signal (bgscan) rather than by hand, and a J714s row.