Skip to content

wifi: apple: centauri: t6050: take the band caps from firmware - #3944

Merged
DjDeveloperr merged 2 commits into
aurora-silicon:mainfrom
tully-8888:feat/t6050-wifi-band-caps
Dec 2, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-silicon:mainfrom
tully-8888:feat/t6050-wifi-band-caps

Conversation

@tully-8888

@tully-8888 tully-8888 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What: The t6050 driver registers 2.4 and 5 GHz with no HT, VHT or HE capabilities (only 6 GHz has HE), so iw phy and user space see those bands as legacy only. Take HT, VHT and HE from the firmware's capabilities reply, as the shared transport driver does since #3458, and trim the 2.4 GHz HE copy to 20 and 40 MHz.
Tested: J714s (MacBook Pro 14-inch, M5 Pro) at a040d04, loaded as a module on a local 7.3 kernel: 9 Capabilities lines in iw phy (2 before), HT on 2.4 and 5 GHz, VHT on 5 GHz, HE on all three bands; joined 5 GHz (5220 MHz, -40 dBm); gateway ping 1000 x 20 ms p50 3.51 / p99 6.98 ms, 0% loss.
Risk: two-way door · Macs that bind apple_centauri_t6050 (M5 Pro, M5 Max)
Not yet: a join on 2.4 GHz and on 6 GHz (only 5 GHz was joined).

Details

The firmware's reply to system command 8 already carries the three elements: the HT element at offset 87 of TLV 262, the VHT element in TLV 0xbf and the HE element in TLV 0xff. band_caps_from_firmware() copies them to the bands: HT on 2.4 and 5 GHz, VHT on 5 GHz, HE on all three. A missing element leaves its band as it was, and without HE there is still no 6 GHz band.

The second commit clears the 160 MHz bits (punctured preamble, beamformee sounding above 80 MHz, 160 MHz PPDU) in the 2.4 GHz HE copy, checks the element with ieee80211_he_capa_size_ok(), reads only the MCS maps the width set lists, and takes the 6 GHz minimum MPDU start spacing from the HT element.

Evidence

At a040d04 on the J714s, module built against the running kernel and swapped in live:

Check Result
iw phy phy0 info | grep -c Capabilities 9
HT capabilities, 2.4 and 5 GHz 0x886f
VHT capabilities, 5 GHz 0x13b1f076
HE PHY capabilities 2.4, 5 and 6 GHz
Link 5220 MHz, -40 dBm
Gateway ping, 1000 x 20 ms, p50 / p99 / max 3.51 / 6.98 / 8.23 ms, 0% loss
Same ping with iw dev wlan0 station dump every second avg 3.69 ms, max 23.1 ms, 0% loss

The only kernel warnings in the run are the ones every module reload prints, the stock module included: probe error -108 while the chip resets, and a first join that times out with firmware status 306 before the retry joins.

Earlier, on a local 7.3 kernel with the same centauri_wifi.c band caps code (the file there also had the TKIP group change from #2872, which this PR does not carry):

Check Before With the change
iw phy phy0 info | grep -c Capabilities 2 9
HT caps none 2.4 and 5 GHz
VHT caps none 5 GHz
HE PHY caps 6 GHz 2.4, 5 and 6 GHz
Link 5220 MHz, 80 MHz HE
Gateway ping, 1000 x 20 ms, p50 / p99 3.49 / 6.41 ms 3.53 / 7.69 ms, second run 3.46 / 6.81 ms
Kernel warnings from the driver 0 0

At this head: make LLVM=1 W=1 M=drivers/net/wireless/apple/centauri modules builds with 0 warnings. checkpatch.pl --strict on both commits: 0 errors; the first commit has one long line that the second commit rewraps.

…ware

The 2.4 and 5 GHz bands were registered without HT, VHT or HE
capabilities; only 6 GHz had HE. The firmware already reports all three
in its capabilities reply (system command 8): the HT element at offset
87 of TLV 262, the VHT element in TLV 0xbf and the HE element in TLV
0xff.

Port band_caps_from_firmware() from the shared-transport driver: HT on
2.4 and 5 GHz, VHT on 5 GHz, HE on all three bands with 40 MHz and 160
MHz masked on 2.4 GHz, and the 6 GHz band caps as before. A missing
element leaves its band as it was; without HE there is still no 6 GHz.

Signed-off-by: vlad <tulituvlad@gmail.com>
…E maps

The firmware HE element lists 160 MHz features: punctured preamble,
beamformee sounding above 80 MHz and the 160 MHz PPDU bits. Clear them in
the 2.4 GHz copy, which can only use 20 and 40 MHz.

Check the element with ieee80211_he_capa_size_ok() and read only the MCS
maps its width set lists, so PPE bytes are never taken for a map and a
map the element leaves out stays unsupported. Give the 6 GHz capability
the minimum MPDU start spacing from the HT element.

Signed-off-by: vlad <tulituvlad@gmail.com>
@tully-8888
tully-8888 marked this pull request as ready for review December 2, 2026 17:12
@tully-8888
tully-8888 requested review from a team as code owners December 2, 2026 17:12
@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Merge readiness at a040d04c: not ready yet

Check Detail
CI at head ok 4 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at a040d04c
Conflicts ok none
PR text ok Risk: two-way · Macs that bind applecentaurit6050 (M5 Pro, M5 Max)

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed at a040d04c0562 (non-author, 12-01 bar).

band_caps_from_firmware() bounds-checks the HT (TLV 262 offset 87), VHT (TLV 0xbf), and HE (TLV 0xff via ieee80211_he_capa_size_ok()) elements, sizes MCS maps via ieee80211_he_mcs_nss_size() so PPE bytes cannot be misread as MCS maps, trims >40 MHz capabilities on 2.4 GHz and 2.4 GHz-only bits on 5/6 GHz, and populates 6 GHz MIN_MPDU_START from HT ampdu_density. Exact-head J714s row at a040d04c0562 passes (9 Capabilities lines, 5 GHz join + 1000-ping 0% loss, 0 warnings).

@DjDeveloperr
DjDeveloperr merged commit fa353bd into aurora-silicon:main Dec 2, 2026
5 checks passed
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged as fa353bd (gh pr merge 3944 --merge --match-head-commit a040d04c). Hosted CI skipped this PR (path filter), so I ran the equivalent build on pc instead.

Tree: main 2f5b01a merged with #3944 (a040d04) and #3945 (4ce92d0), giving local merge c1d4e460 (tree 3388cb36). Both merges were clean with git merge-tree --write-tree --merge-base=8616760e. Main has since gained 8 commits (drm/asahi Rust, sched/psi.c, a clpc host test, one t602x dts line), and none of them touch these files. The landed centauri_wifi.c (blob 5012fd46) is byte-identical to the one built.

Build: arm64 aurora_defconfig, byte-identical to a fresh one, with APPLE_CENTAURI_T6050=m and APPLE_CENTAURI_T6050_WIFI=y. Toolchain clang 23.1.3 and rustc 1.100.1. It was an incremental build from a warm main 048505b output.

  • make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu- Image modules: rc 0. centauri_wifi.o was rebuilt and apple_centauri_t6050.ko linked (depends=cfg80211). modpost ran over every module with no errors and no warnings for this module. The only warnings are 4 old "missing MODULE_DESCRIPTION" ones on unrelated test modules.
  • make ... W=1 drivers/net/wireless/apple/centauri/t6050/centauri_wifi.o: rc 0, 0 warnings.
  • scripts/checkpatch.pl --strict on each commit:
    • a040d04: clean.
    • cf0f4dc: 0 errors, 1 warning, 1 check. Line 1248 is 112 columns (the IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK line), and line 1244 ends in (. These are style nits only and don't block; they could go in a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants