Skip to content

wifi: apple: centauri T6050: accept the supplicant's scan IEs - #2421

Merged
DjDeveloperr merged 2 commits into
aurora-silicon:integration/aurorafrom
Isaac-Duarte:j714s/wifi-scan-ies
Nov 20, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-silicon:integration/aurorafrom
Isaac-Duarte:j714s/wifi-scan-ies

Conversation

@Isaac-Duarte

@Isaac-Duarte Isaac-Duarte commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

On the J714s under Fedora 44, Wi-Fi never connects: every scan NetworkManager asks for fails, and wpa_supplicant logs CTRL-EVENT-SCAN-FAILED ret=-22 every few seconds. The T6050 driver leaves max_scan_ie_len at 0, so nl80211 refuses with -EINVAL any scan that carries IEs, and wpa_supplicant 2.11 adds some to every scan.

The wiphy now accepts up to 512 bytes of scan IEs, the limit wl1251 sets for the same reason. Captured from its NL80211_CMD_TRIGGER_SCAN requests (nlmon), wpa_supplicant 2.11 here adds 15 bytes to every scan: Extended Capabilities (11 bytes) and an empty Mesh ID. The rest of the 512 leaves room for optional IEs such as WPS or Interworking. scan_profile27() builds the firmware's scan command from the channels and the SSID alone (no IE field is known for it) and never reads request->ie, so the IEs don't reach the firmware. Scheduled scans aren't implemented, and the driver doesn't set WIPHY_FLAG_SPLIT_SCAN_6GHZ, so no other path sees the IEs.

The second commit sets the same limit in the T8142 driver (centauri/centauri_wifi.c, J813/J815), which also left it at 0. Its build_scan() follows the macOS request and ignores the cfg80211 request entirely, so the change is inert there apart from letting the scan through. Whether J813/J815 actually hit the refusal hasn't been checked.

Testing:

  • T6050, J714s (M5 Pro): two kernels (stock 7.3.0-36.n1usb and a local build) were each booted without and then with this change. Without it: 46 and 37 ret=-22 failures over boots of about eight minutes, and no connection. With it: no ret=-22 in any of about 90 boots since on the kernels built with it, NetworkManager connects, and iw phy reports max scan IEs length: 512 bytes.
  • T8142: compile-checked only (W=1, clean). Wanted: one J813 or J815 boot with this series, no ret=-22 over about 10 minutes, NetworkManager connected, iw phy showing the 512-byte limit.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, this is a clear diagnosis and the before/after counts make the case well.

The reason is cfg80211's check against max_scan_ie_len plus what wpa_supplicant 2.11 sends, and neither depends on the SoC. So the same refusal should hit the T8142 driver (drivers/net/wireless/apple/centauri/centauri_wifi.c:2524 leaves the field at 0 too, used by J813/J815). Could this PR set it in both drivers, so the fix isn't limited to the T6050 copy? A J813 or J815 owner can confirm with the same CTRL-EVENT-SCAN-FAILED ret=-22 count before/after.

Two small points on the comment:

  • If the profile27 scan command has no field for extra IEs, please say that in the comment ("the firmware's scan command cannot carry them"), so a later reader doesn't take dropping them for an oversight.
  • Please state where 512 comes from (for example, "covers the IEs wpa_supplicant/NetworkManager add, as wl1251 does"), rather than leaving it as a bare number.

Rows: your J714s numbers cover T6050. For the T8142 hunk, one J813/J815 boot: no ret=-22 over about 10 minutes, NetworkManager connects, iw phy shows the 512-byte limit.

The T6050 Wi-Fi left max_scan_ie_len at 0, so cfg80211 refused with
-EINVAL any scan request that carried IEs, and wpa_supplicant adds some to
every scan. On a J714s under Fedora 44 (wpa_supplicant 2.11 through
NetworkManager) no scan got through: wpa_supplicant logged
CTRL-EVENT-SCAN-FAILED ret=-22 every few seconds and the radio never
connected.

The wiphy now takes up to 512 bytes of scan IEs, the limit wl1251 sets
for the same reason. Captured from its NL80211_CMD_TRIGGER_SCAN requests,
wpa_supplicant 2.11 on the J714s adds 15 bytes (Extended Capabilities and
an empty Mesh ID); the rest leaves room for optional IEs such as WPS or
Interworking. scan_profile27() builds the firmware's scan command from the
channels and the SSID alone, so the IEs never reach the firmware.

Tested on a J714s (M5 Pro), on two kernels each booted without and then
with this change: without it, 46 and 37 ret=-22 failures over boots of
about eight minutes and no connection; with it, no ret=-22 in any of
about 90 boots since on the kernels built with it, NetworkManager connects,
and iw phy reports "max scan IEs length: 512 bytes".

Signed-off-by: Isaac Duarte <[email protected]>
The T8142 Wi-Fi driver, used by the J813 and J815, leaves
max_scan_ie_len at 0, as the T6050 driver did. cfg80211 then refuses any
scan request that carries IEs with -EINVAL. On the J714s, wpa_supplicant
added IEs to every scan, and the T6050 driver got no scan through at all.
Whether the supplicant does the same on a J813 or J815 hasn't been
checked, but nothing here depends on the SoC.

The wiphy now takes up to 512 bytes of scan IEs, as in the T6050 driver
(wpa_supplicant 2.11 adds 15 bytes on the J714s).
build_scan() builds the firmware's request from the driver's own channel
table and never reads the cfg80211 request, so the IEs are dropped.

Compile-checked only (W=1, clean); not yet run on a J813 or J815.

Signed-off-by: Isaac Duarte <[email protected]>
@Isaac-Duarte

Isaac-Duarte commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi brother, thanks for the review!

All three points are addressed in 6595021.

  • T8142: the second commit sets the same 512 in centauri/centauri_wifi.c. Its build_scan() follows the macOS request and never reads the cfg80211 request, so the IEs are dropped there as well. It's compile-checked only (W=1, clean). It isn't confirmed that J813/J815 actually hit the refusal. The IEs below aren't SoC-specific, so the same wpa_supplicant should hit it, but the scan code there mentions the supplicant choosing from scan results, so some setup gets scans through. The limit is harmless either way.
  • Where 512 comes from: captured with nlmon on the J714s, wpa_supplicant 2.11 puts 15 bytes of IEs in every NL80211_CMD_TRIGGER_SCAN: Extended Capabilities (11 bytes) and an empty Mesh ID. 512 is wl1251's limit for the same case and leaves room for optional IEs (WPS, Interworking). cfg80211 sizes each request by the IEs actually sent, so the headroom costs nothing. The comments now say this.
  • "Cannot carry them": the comment says "no known field" instead. All that's known is that the command we build (channel, options and SSID TLVs) has no IE field. The firmware may have an IE TLV nobody has found.

@Isaac-Duarte
Isaac-Duarte marked this pull request as ready for review November 19, 2026 18:07
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, that covers all three points. The 15-byte nlmon figure plus wl1251's limit is a good source for 512, and "no known field" is the right wording.

Remaining row for the T8142 hunk, on any machine that uses centauri/centauri_wifi.c (J813, J815 or J873g): about 10 minutes booted with NetworkManager connected, no CTRL-EVENT-SCAN-FAILED ret=-22, and iw phy | grep "scan IEs" showing 512 bytes. This is a capability field only, so a clean no-regression boot is enough even if the -22 never showed up there.

@Isaac-Duarte

Copy link
Copy Markdown
Contributor Author

I only have a J714s, so the T8142 row needs a J813, J815 or J873g owner to boot this series. If that holds up the T6050 fix, I can split the T8142 commit into its own PR.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Review (merge lane), head 65950214ce0f:

Both drivers set max_scan_ie_len = 512 before wiphy_register(). The only behaviour change is that nl80211 stops refusing scans that carry IEs with -EINVAL, and the wiphy now advertises 512. Neither scan path reads request->ie:

  • T6050 scan_profile27() fills a fixed buffer from the channels and SSID only.
  • T8142 build_scan() ignores the cfg80211 request.

Nothing else reaches the IEs either. Neither driver implements sched_scan, WIPHY_FLAG_SPLIT_SCAN_6GHZ isn't set, and the connect IEs stay bounded by sizeof(request_ie). No feature or flag bits change, so nothing can overflow and scanning behaves the same apart from no longer being refused.

Local checks on the merge into integration/aurora 1473d156d6ca:

  • Both centauri_wifi.o objects build with W=1 and no warnings.
  • The centauri host tests pass.

Two comment nits, not blocking:

  • The 15-byte figure comes from Fedora 44's wpa_supplicant 2.11. The 2.12 build on our Arch kit sends no scan IEs.
  • For T8142, "build_scan() never reads the request" is the verifiable reason; "the macOS request carries no IEs" isn't shown anywhere.

Merging. The J813/J815/J873g no-regression boot is a post-merge row.

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.

3 participants