Repository navigation
wifi: apple: centauri: t6050: take the band caps from firmware - #3944
Conversation
…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>
|
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. |
RyanTheTide
left a comment
There was a problem hiding this comment.
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).
|
Merged as fa353bd ( Tree: main 2f5b01a merged with #3944 (a040d04) and #3945 (4ce92d0), giving local merge c1d4e460 (tree 3388cb36). Both merges were clean with Build: arm64
|
What: The t6050 driver registers 2.4 and 5 GHz with no HT, VHT or HE capabilities (only 6 GHz has HE), so
iw phyand 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
Capabilitieslines iniw 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:
iw phy phy0 info | grep -c Capabilitiesiw dev wlan0 station dumpevery secondThe 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.cband caps code (the file there also had the TKIP group change from #2872, which this PR does not carry):iw phy phy0 info | grep -c CapabilitiesAt this head:
make LLVM=1 W=1 M=drivers/net/wireless/apple/centauri modulesbuilds with 0 warnings.checkpatch.pl --stricton both commits: 0 errors; the first commit has one long line that the second commit rewraps.