Repository navigation
t8132: Wi-Fi follows the regulatory country (trivial ccode map) and brcmfmac says which country it runs - #1917
Conversation
The BCM4388 on the T8132 laptops takes ISO 3166 country codes as its own codes (revision 0), as on every other Apple Silicon machine, but its node lacked brcm,ccode-map-trivial. brcmfmac then has no translation for the chip and drops every regulatory hint: the country an access point advertises, iw reg set or wireless-regdom. The firmware stays on its worldwide default (phy country 99) where macOS on the same Mac runs the access point's country (US). Add the property, as the t8103, t8112, t8122, t600x, t603x and t604x device trees have it. Assisted-by: LLM Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
UPSTREAM.md: rows for the three pull requests opened today: the T8132 Wi-Fi country map and its log line, the T8132 ISP power-down as macOS does it, and the Apple Silicon CPU profiles in power-profiles-daemon.
brcmfmac registers its own regulatory domain, named "99", and keeps it whatever country it then programs into the firmware, so "iw reg get" shows "country 99" for the wiphy on every machine. Whether a country hint (the access point's country, iw reg set) reached the firmware is only visible at debug level: the set, the "already set" and the "no code for it" paths are silent, and only a firmware refusal is logged. Log the country and the firmware code and revision at info level when the firmware takes it or already has it, and once when the driver has no code for the hinted country. Assisted-by: LLM Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
|
The host-tests failure was mine: |
7bba4f4 to
d6b2923
Compare
|
Tested on a J604 (MacBook Pro 14", M4, Mac16,1; os-fw 26.6.2, system-fw 27.0; aura 1.0.0b13). The kernel was alarm-aurora's pkgrel 38 recipe on I tested this PR at 7bba4f4. Its driver and DT hunks are identical to the current d6b2923; only Disclosure: an LLM (Claude) ran these tests on my Mac and drafted this. I did the listening and looking, reviewed it, and am responsible for it. Assisted-by: LLM |
The T8132 laptops' BCM4388 never left its worldwide country default, because the Wi-Fi node lacked
brcm,ccode-map-trivial. This series adds the property and makes brcmfmac say which country the firmware runs.Patch 1:
arm64: dts: apple: t8132: Use the trivial country code map for Wi-Fi. Like the chips on every other Apple Silicon machine, the T8132's BCM4388 takes ISO 3166 codes as its own codes, at revision 0. The t8103, t8112, t8122, t600x, t603x and t604x trees already setbrcm,ccode-map-trivial;t8132-jxxx.dtsidid not. Without it brcmfmac has no translation for the chip and drops every regulatory hint, whether it comes from the access point's country,iw reg setorwireless-regdom. The firmware therefore stays on its worldwide default. On a J604 (14" MacBook Pro M4), macOS on the same Mac and network runs the access point's country, US.Patch 2:
wifi: brcmfmac: Say which country the firmware runs. brcmfmac registers its own regulatory domain, "99", and keeps it whatever country it then programs into the firmware, soiw reg getshowscountry 99for the wiphy on every machine. Whether a hint reached the firmware was only visible at debug level. This patch logs the country and the firmware code and revision at info level when the firmware takes the hint or already has it. It logs once when the driver has no code for the hinted country.Measured on the J604 (MEASURED 2026-11-14). Our kernel 1.905 carries patch 1, and 1.907 adds patch 2; on 1.907 the log reads
brcmfmac: country US set in firmware (US rev 0). Before patch 1 the firmware stayed on the worldwide default.Checked on top of
integration/aurora7c71d6d:CHECK_DTBS=yfor t8132-j604, -j713 and -j715: the property is in all three DTBs, and the schema output is identical with and without the series (it adds nothing)Tested on the J604 only. The J713 and J715 share
t8132-jxxx.dtsi, so they get the property too, but they have not been run with it.