Repository navigation
wifi: apple: centauri T6050: accept the supplicant's scan IEs - #2421
DjDeveloperr merged 2 commits into
Conversation
|
Thanks, this is a clear diagnosis and the before/after counts make the case well. The reason is cfg80211's check against Two small points on the comment:
Rows: your J714s numbers cover T6050. For the T8142 hunk, one J813/J815 boot: no |
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]>
8d7ae7c to
6595021
Compare
|
Hi brother, thanks for the review! All three points are addressed in 6595021.
|
|
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 |
|
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. |
|
Review (merge lane), head Both drivers set
Nothing else reaches the IEs either. Neither driver implements sched_scan, Local checks on the merge into integration/aurora
Two comment nits, not blocking:
Merging. The J813/J815/J873g no-regression boot is a post-merge row. |
449c6a1
into
aurora-silicon:integration/aurora
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=-22every few seconds. The T6050 driver leavesmax_scan_ie_lenat 0, so nl80211 refuses with-EINVALany 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_SCANrequests (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 readsrequest->ie, so the IEs don't reach the firmware. Scheduled scans aren't implemented, and the driver doesn't setWIPHY_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. Itsbuild_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:
ret=-22failures over boots of about eight minutes, and no connection. With it: noret=-22in any of about 90 boots since on the kernels built with it, NetworkManager connects, andiw phyreportsmax scan IEs length: 512 bytes.ret=-22over about 10 minutes, NetworkManager connected,iw physhowing the 512-byte limit.