Skip to content

fix: preserve WPA3 on Broadcom BCM4364 and Apple Silicon Macs - #13024

Open
thedavidweng wants to merge 4 commits into
omacom:quattrofrom
thedavidweng:fix/broadcom-wpa3-t2-clean
Open

thedavidweng wants to merge 4 commits into
omacom:quattrofrom
thedavidweng:fix/broadcom-wpa3-t2-clean

Conversation

@thedavidweng

@thedavidweng thedavidweng commented Sep 23, 2026 •

Copy link
Copy Markdown

Fixes #9802.
Supersedes #9803.
Follow-up to #6652, #7439, #7577, #7487, #9019, #12688.

Summary

Stop applying the brcmfmac transition-mode quirk (feature_disable=0x82000) to Broadcom BCM4364 (14e4:4464) and Apple Silicon (14e4:4425|4433), and to every T2 Mac, restoring native WPA3-SAE offload without breaking legacy hardware.

 install/hardware/apple/fix-brcmfmac-supplicant.sh
-if lspci -nn | grep "106b:180[12]" >/dev/null ||
-  { [[ $sys_vendor == Apple* ]] &&
-    lspci -nn | grep -E "14e4:(43ba|43bb|43bc|43a3|43dc|4464|4488|4425|4433)" >/dev/null; }; then
+if [[ $sys_vendor == Apple* ]] &&
+  ! lspci -nn | grep "106b:180[12]" >/dev/null &&
+  lspci -nn | grep -E "14e4:(43ba|43bb|43bc|43a3)" >/dev/null; then

Context & Root Cause History

  • Origin (Apply the Broadcom Wi-Fi quirk to Macs without a T2 #6652): Introduced feature_disable=0x82000 to work around firmware 4-way handshake timeouts on legacy Macs (primarily BCM43602 on MacBookPro11,4 and 14,x) connecting to WPA2/WPA3 transition APs.

  • Apple Silicon breakage (No Wi-Fi on Apple Silicon Macs: the Broadcom quirk's chip-ID gate includes BCM4378/4387 #7439, Stop the Broadcom Wi-Fi quirk breaking Apple Silicon Macs #7577): The derived PCI ID list included BCM4378 (4425) and BCM4387 (4433), which completely wedged Wi-Fi on M1/M2 systems.

  • WPA3 breakage on Intel Macs (MacBookPro16,1 Broadcom quirk disables WPA3-SAE #9802, Fix WPA3 on MacBookPro16,1 #9803):

    • 0x82000 sets bit 13 (BRCMF_FEAT_FWSUP) and bit 19 (BRCMF_FEAT_SAE). It never disabled FWAUTH (bit 20, 0x100000).

    • BRCMF_FEAT_SAE_EXT, the driver's userspace-SAE feature, is enabled only when the firmware's cap string contains sae_ext (brcmf_fwcap_map in brcmfmac/feature.c), and its only effect in the driver is the NL80211_FEATURE_SAE advert in cfg80211.c. The Apple parts do not have it, so disabling BRCMF_FEAT_SAE removes NL80211_EXT_FEATURE_SAE_OFFLOAD and leaves the driver with no route to WPA3-SAE at all.

    • As a result, WPA3-SAE networks fail to associate on all BCM4364 systems.

    • PR Fix WPA3 on MacBookPro16,1 #9803 correctly identified this mechanism but scoped the exemption narrowly to DMI product MacBookPro16,1.

  • Why the whole T2 group can go back to driver defaults: two things changed, not just the BCM4364 exemption.

    • The quirk is a wpa_supplicant workaround, not a firmware one. hostap commit 41638606054a ("Mark authorization completed on driver indication during 4-way HS offload") made wpa_supplicant 2.11 complete WPA state from the driver's authorization event, which broke WPA2-PSK and WPA3-SAE association on brcmfmac generally: it has wpa_supplicant wait for a port-authorized indication that brcmfmac only sends for 802.1X fast-transition roams. That commit is still present in hostap hostap_2_12 and main; nothing upstream reverted it. What clears the regression on Arch is a downstream revert, 0008-Revert-Mark-authorization-completed-on-driver-indica.patch at the root of the wpa_supplicant packaging directory (taken from Fedora, added in packaging commit cef15ba), which first shipped in wpa_supplicant 2:2.12-1 (2026-08-10) — the version Omarchy's mirrors serve. So the regression the workaround outlived no longer exists on Arch, and this depends on Arch keeping that patch: a future wpa_supplicant release that drops it would bring the association timeouts back on brcmfmac, at which point the T2 and BCM4364 exemptions would need revisiting. The installer comment names the patch for that reason.

    • Not every T2 Mac carries BCM4364. Linux documents the other T2 Broadcom parts as 14e4:43dc = BCM4355 (MacBook Air 13" Late 2018 / True Tone 2019; brcmfmac commit 69005e67ce54) and 14e4:4488 = BCM4377 (MacBook Pro 13" Touch 2019, MacBook Pro 13" 2020, MacBook Air 13" Scissor 2020; commit bf8bbd903f07). Both are T2-only in those lists, so the 106b:180[12] exclusion — not the BCM4364 exemption — is what keeps the quirk off them. That is why 43dc and 4488 are dropped from the legacy list instead of kept: with the T2 exclusion in place they matched no documented Mac, and leaving them in would only re-arm the WPA3 break on any board the T2 check failed to see. Both gates are now pinned separately by tests, since no real Mac carries a T2 together with a legacy part and would otherwise leave the T2 check untested.

  • Fix:

    • Exclude every T2 Mac (106b:180[12]) plus BCM4364 (14e4:4464) and Apple Silicon (14e4:4425|4433) from receiving the quirk.

    • Only apply the quirk to legacy pre-T2 Broadcom parts (14e4:(43ba|43bb|43bc|43a3)).

    • Add a migration that removes Omarchy's own 0x82000 block wherever it appears in /etc/modprobe.d/brcmfmac.conf, on whole-line boundaries, keeping every other byte the user wrote, and requests a reboot.

Live tests

Provenance is spelled out per machine below: the before and after states on one and the same MacBookPro15,2, plus the after state on MacBookPro16,1 reported by the #9802 reporter.

Before, measured on MacBookPro15,2 (BCM4364 14e4:4464 + T2 106b:1801, firmware 9.30.503.0.32.5.92)

The install-time quirk block (mtime 2026-09-10, unchanged since Omarchy wrote it) was in /etc/modprobe.d/brcmfmac.conf and loaded. iw prints only the extended features that are present, so the missing 4WAY_HANDSHAKE_STA_PSK, 4WAY_HANDSHAKE_STA_1X and SAE_OFFLOAD lines are the observation:

$ iw phy phy0 info | sed -n '/Supported extended features/,/^$/p'
	Supported extended features:
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ DFS_OFFLOAD ]: DFS offload
		* [ 4WAY_HANDSHAKE_AP_PSK ]: AP mode PSK offload support

With no SAE offload left, association to a WPA3-SAE AP fails:

wpa_supplicant: wlp1s0: WPA: Failed to select authenticated key management type
wpa_supplicant: wlp1s0: WPA: Failed to set WPA key management and encryption suites
NetworkManager: device (wlp1s0): Activation: (wifi) association took too long, failing activation
NetworkManager: device (wlp1s0): state change: config -> failed (reason 'ssid-not-found')

After, measured on that same MacBookPro15,2 (BCM4364 14e4:4464 + T2 106b:1801, firmware 9.30.503.0.32.5.92, kernel 7.2.6-arch2-Watanare-T2-4-t2)

The block was removed from /etc/modprobe.d/brcmfmac.conf exactly as 1790165000.sh removes it, then the machine rebooted — same firmware 9.30.503.0.32.5.92 FWID 01-88a8883 and same kernel as the before state above, so the two transcripts differ only in the quirk. Every STA-side feature comes back, and with it SAE_OFFLOAD:

$ iw phy phy0 info | sed -n '/Supported extended features/,/^$/p'
	Supported extended features:
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ 4WAY_HANDSHAKE_STA_PSK ]: 4-way handshake with PSK in station mode
		* [ 4WAY_HANDSHAKE_STA_1X ]: 4-way handshake with 802.1X in station mode
		* [ DFS_OFFLOAD ]: DFS offload
		* [ SAE_OFFLOAD ]: SAE offload support
		* [ 4WAY_HANDSHAKE_AP_PSK ]: AP mode PSK offload support
		* [ SAE_OFFLOAD_AP ]: AP mode SAE authentication offload support

SAE_OFFLOAD_AP comes back as well, which the analysis below did not claim: it sits under FWAUTH and SAE, so 0x82000 removed it too.

The WPA2 network Ether re-associated on its own after the reboot and passes ping. The WPA3-only AP in range (Radiation, reported by nmcli dev wifi list as WPA3, saved profile with key-mgmt=sae) now associates, takes a DHCP lease and passes ping:

$ nmcli con up Radiation
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)
$ nmcli -g GENERAL.STATE,GENERAL.CONNECTION dev show wlp1s0
100 (connected):Radiation
$ nmcli -g 802-11-wireless-security.key-mgmt con show Radiation
sae
$ ping -c 3 192.168.1.1
3 packets transmitted, 3 received, 0% packet loss, time 2001ms

NetworkManager's own log for that association:

NetworkManager[815]: device (wlp1s0): Activation: (wifi) connection 'Radiation' has security, and secrets exist.  No new secrets needed.
NetworkManager[815]: Config: added 'key_mgmt' value 'SAE FT-SAE'
NetworkManager[815]: device (wlp1s0): Activation: (wifi) disconnected during association, retrying connection
NetworkManager[815]: device (wlp1s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "Radiation"
NetworkManager[815]: dhcp4 (wlp1s0): state changed new lease, address=192.168.1.125
NetworkManager[815]: device (wlp1s0): Activation: successful, device activated.

The first attempt dropped during association and the retry connected 4 seconds later; that is what I observed, and Ether re-associated the same way after the reboot.

Not tested: WPA2/WPA3 transition mode, which is what the quirk originally existed for. No transition-mode AP was in range on this machine. It is expected to work now — with FWSUP and SAE both back, the firmware handles the handshake and SAE for every AP, which is exactly what the legacy pre-T2 parts still cannot do and why they keep the quirk — but that is a prediction from the source, not an observation.

After, measured on MacBookPro16,1 (BCM4364 14e4:4464, no T2, firmware 9.30.514.0.32.5.94)

Not measured by me — this is the result reported in #9802: reloading brcmfmac with the block gone brought SAE_OFFLOAD back in iw and a WPA3-only network connected. That machine covers the BCM4364 exemption, not the T2 one, which is why the T2 part of the gate needed the run above.

Mechanism, verified on the affected hardware

On that same MacBookPro15,2 (BCM4364 14e4:4464 and T2 106b:1801, firmware 9.30.503.0.32.5.92 FWID 01-88a8883, kernel 7.2.6-arch2-Watanare-T2-4-t2) while it still carried the old block, the quirk's whole effect was the before-state iw transcript above: every STA-side feature gone, only 4WAY_HANDSHAKE_AP_PSK left. The after-state transcript shows the same driver coming back up without the block and with all of them restored.

feature_disable=0x82000 sets bits 13 and 19 of the driver's BRCMF_FEAT_LIST, which are FWSUP and SAE; FWAUTH (bit 20) and SAE_EXT (bit 25) are untouched. In brcmfmac/cfg80211.c, NL80211_EXT_FEATURE_SAE_OFFLOAD is nested inside the BRCMF_FEAT_FWSUP guard and gated on BRCMF_FEAT_SAE, so it disappears, while 4WAY_HANDSHAKE_AP_PSK under FWAUTH survives — which is precisely the asymmetry in that transcript. The same gating is in the v7.2 line, which is the one this machine runs.

SAE_EXT is the driver's userspace-SAE feature, and on this hardware it is not available either: brcmf_fwcap_map in brcmfmac/feature.c enables it only for firmware whose cap string contains sae_ext, and its one use in the driver is the NL80211_FEATURE_SAE advert in cfg80211.c. The external_auth op that would give that advert meaning, brcmf_cyw_external_auth in brcmfmac/cyw/core.c, is registered only by the Cypress/PCIe bus. The Apple parts do not attach there: brcmf_pcie_devid_table maps 4364, 4377, 4378 and 4387 to the WCC bus (WCC/WCC_SEED), and brcmfmac/wcc/core.c registers no external_auth. That is why disabling the offload leaves these Macs with no route to WPA3-SAE.

Running the PR's own scripts against that machine, with only the file paths redirected into a sandbox: the installer leaf writes nothing, the cleanup migration removes the block and requests the reboot, and the legacy migration skips with zero privileged calls.

Test suites

  • test/shell.d/brcmfmac-supplicant-test.sh — installer gate and the legacy migration: T2 Macs (on BCM4364, BCM4355 and BCM4377) get no quirk and are skipped by the legacy migration; BCM4364 and Apple Silicon get no quirk; BCM43602 and BCM4350 still get it; non-Apple vendors, brcmfmac-less parts and missing hardware are left alone; append/idempotency behavior is unchanged. A T2 Mac reporting a legacy part is covered explicitly, because no documented hardware exercises the 106b:180[12] check on its own once 43dc and 4488 are out of the legacy lists; without that case, deleting the T2 check from the installer or from 1786391100.sh left this suite passing.

  • test/shell.d/brcmfmac-wpa3-cleanup-test.sh — cleanup: removes the legacy and current Omarchy blocks on T2, BCM4364 and Apple Silicon; removes a block that has user lines both before and after it; preserves unrelated options lines; leaves administrator-merged (feature_disable alongside other options) and reworded blocks untouched with no reboot request; writes through a symlink; leaves legacy pre-T2 models alone; stays idempotent; sets reboot-required before the edit.

The two T2-on-a-legacy-part cases were added after review found that, with 43dc and 4488 out of the legacy lists, deleting the 106b:180[12] check from the installer or from 1786391100.sh left this suite passing. All three gates are now pinned: each mutant fails the suite that owns it.

Related open PRs

Two open PRs touch the same installer gate and are worth sequencing before merge:

  • #10306 adds omarchy-pkg-add apple-bcm-firmware inside the branch this PR narrows to pre-T2 IDs. If it is rebased with the package step left inside that branch, a fresh BCM4364 iMac19,x would stop getting the firmware #10306 exists to install. Gating the firmware install on the full Broadcom population, separately from the quirk gate, avoids that. This PR does not touch that step.
  • #9803, which this PR supersedes, writes a differently worded comment above the same options line. The cleanup matches blocks literally, so it would not remove a block written by that wording. Landing this PR first avoids the issue; if #9803 lands first, the cleanup needs a third owned-block variant.

Merge Danger

Door: Two-way

The change removes a modprobe file from /etc/modprobe.d/ on affected systems. If any unforeseen regression occurs, re-adding options brcmfmac feature_disable=0x82000 restores the previous behavior immediately.

Blast Radius: Low

Restricted entirely to Apple hardware with Broadcom Wi-Fi. Fixes WPA3 across all T2 and BCM4364 Mac models while preserving the fallback for older legacy pre-T2 Macs.

@llstrk

llstrk commented Sep 24, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Verified: the core fix is sound. feature_disable=0x82000 masks brcmfmac FWSUP (bit 13) and SAE (bit 19). With either masked, the driver stops advertising SAE_OFFLOAD, and wpa_supplicant then drops every SAE key management option, which produces the "Failed to select authenticated key management type" error in the PR description. Removing the quirk from BCM4364 and Apple Silicon (4425/4433) follows from that source, and the corrected comment (SAE, not FWAUTH) is accurate. In isolated runs with stubbed hardware, the new install gate, the edited 1786391100.sh and the new cleanup behave as described for unmodified files: exact Omarchy blocks are removed, preceding user lines are kept byte for byte, reboot-required is set before the edit and only when something changes, administrator-merged options lines are left alone, symlinks are written through, and an unreadable file fails the migration so it is retried. Both PR test suites pass on the head and fail on the base code for the intended reasons.

Two issues and one test gap remain.

Cleanup silently skips an Omarchy block that has lines after it

migrations/1790165000.sh accepts the legacy T2 block only as the whole file and the current block only as the end of the file. On a T2 or BCM4364 Mac where a user later appended anything after the Omarchy block, the migration exits 0 without editing:

Start file on T2 + 14e4:4464 Result Effective brcmfmac options after
Omarchy block only block removed, reboot requested driver defaults
user line, then Omarchy block block removed, user line kept user line only
Omarchy block, then options brcmfmac roamoff=1 no edit, no reboot, migration marked done feature_disable=0x82000 roamoff=1
Omarchy block, then a comment no edit, no reboot, migration marked done feature_disable=0x82000

(Effective options are derived from kmod and kernel parameter-parsing source, not from running modprobe.)

No Omarchy writer puts content after its block. The installers overwrite the file, and the old migration appends its block at the end. This shape therefore comes from a later user edit, such as sudo tee -a or an editor. On T2 Macs, which received the block at install time, any later customization lands in exactly this position.

Impact: for those users, WPA3-only networks keep failing, while the update prints "Restore WPA3 support on Broadcom BCM4364 and Apple Silicon Macs". omarchy-migrate marks the migration done, so it is not retried. feature_disable is not exposed in sysfs, so the leftover quirk is hard to spot.

Suggested change: remove either exact Omarchy block wherever it appears on whole-line boundaries, keeping all other bytes. Any feature_disable= value an administrator added after the block already overrides it, so this never changes an administrator-set value. A disposable variant doing this still passed all 8 assertions in brcmfmac-wpa3-cleanup-test.sh and left administrator-merged and reworded variants untouched. Add a cleanup test with a user line after the block to pin the chosen behavior.

Not every T2 Mac carries BCM4364

The description and comments say every T2 Intel Mac has BCM4364, and they list 43dc and 4488 as legacy pre-T2 parts. The kernel's brcm_hw_ids.h and the commits that added these IDs to brcmfmac say otherwise:

PCI ID PR label brcmfmac identity Documented Macs Head behavior
14e4:43dc "BCM43555", legacy pre-T2 BCM4355 (commit 69005e67ce54) MacBookAir8,1, 8,2 (T2) quirk no longer written; existing block removed on upgrade
14e4:4488 "BCM4355", legacy pre-T2 BCM4377 (commit bf8bbd903f07) MacBookPro15,4, 16,3, MacBookAir9,1 (T2) quirk no longer written; existing block removed on upgrade

Impact: the PR also removes the quirk from these five T2 models, but its hardware evidence covers only BCM4364 (MacBookPro15,2 and 16,1). With the new T2 exclusion, the 43dc and 4488 entries in the legacy list match no documented Mac.

Context: the removal is plausibly correct on these models too. The t2linux Wi-Fi guide recommends this exact feature_disable=0x82000 as a workaround for a wpa_supplicant 2.11 regression (hostap commit 41638606) that broke brcmfmac WPA2-PSK and WPA3-SAE. Arch's wpa_supplicant 2:2.12-1 (August 10, 2026) reverts that commit. That history points to a fixed supplicant, not newer firmware, as the likely reason driver defaults now work across T2 radios. It remains untested on BCM4355 and BCM4377 hardware.

Suggested change: correct the chip names in the description, the installer comment and the test comment. Drop 43dc and 4488 from the legacy list, or explain why they stay. State that BCM4355 and BCM4377 T2 Macs also lose the quirk and why, citing the wpa_supplicant history, and ideally confirm on one of them: iw phy should show SAE_OFFLOAD, then join a WPA3-only and a transition AP.

Optional test improvement: every T2 case in both suites uses 4464, which the Wi-Fi ID lists already handle without the T2 check. Deleting the 106b:180[12] exclusion from the installer, from 1786391100.sh or from the cleanup gate left each suite passing. Adding T2_HARDWARE=1 cases with 4488 or 43dc (no quirk written, old migration skips, cleanup removes an existing block) would catch that.

Documentation note: migrations/1786391100.sh still says T2 installs already carry the quirk from the installer, which no longer holds.


Review information

Test scope: source review of the PR, bin/omarchy-migrate and bin/omarchy-update, and dependency source: Linux brcmfmac (mainline, v7.1 and stable 7.1.8), wpa_supplicant 2.12, NetworkManager and kmod. Isolated command-only runs with stubbed lspci, sudo and omarchy-state and redirected config paths covered an installer matrix, upgrade sequences through the real migration runner, cleanup edge cases, the PR test suites on head and base, and deliberate deletions of the T2 check. No Apple or Broadcom hardware was available. Association behavior is inferred from source and the PR's reported live tests, not reproduced.

AI process: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments with targeted follow-up questions, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@thedavidweng

Copy link
Copy Markdown
Author

Both findings were real. Fixed in 672e0341.

1. Cleanup skipped an Omarchy block with lines after it

Confirmed, and the cause was exactly as described: the migration accepted the legacy block only as the whole file and the current block only as the file's tail, so on a T2 Mac where the installer appended the block and the user later added options brcmfmac roamoff=1 (or any trailing line) the migration exited 0 without editing, while still reporting the WPA3 restore.

migrations/1790165000.sh now drops either owned block wherever it appears on whole-line boundaries and copies every other line through untouched. Matching is a literal line-sequence comparison, not a shell pattern, so a reworded comment or an administrator-merged line stays out of scope. omarchy-state set reboot-required is only reached when a block was actually removed.

Behavior now, all verified by running the migration against stubbed lspci/sudo/omarchy-state:

Start file Result
Omarchy block, then a user line block removed, reboot requested, user line kept
Legacy block between user lines on both sides removed, both user lines kept
Both owned blocks in one file both removed
Administrator sets feature_disable=0 after the block block removed, the administrator's value kept
feature_disable=0x82000 roamoff=1 (merged) untouched, no reboot, no write
Block with one trailing space untouched, no reboot, no write
Reworded comment untouched, no reboot, no write
Block only, no trailing newline file removed, reboot requested
Second run after a successful removal no write, no reboot
Root-only file that sudo cat cannot read migration exits non-zero and stays pending

Four new test cases pin this in brcmfmac-wpa3-cleanup-test.sh (user line after the block, legacy block surrounded by user lines, reworded block untouched, and the reboot-request assertion on the mid-file path).

2. Not every T2 Mac carries BCM4364

Confirmed against the sources you cited, and it changes which list the parts belong in:

  • 14e4:43dc is BCM4355 (commit 69005e67ce54, "This chip is present on at least these Apple T2 Macs: hawaii: MacBook Air 13" Late 2018 / True Tone 2019"), not BCM43555.
  • 14e4:4488 is BCM4377 (commit bf8bbd903f07, "present on at least these Apple T2 Macs: tahiti / formosa / fiji"), not BCM4355. The two names were swapped relative to brcm_hw_ids.h.
  • Both lists are T2-only, so with the 106b:180[12] exclusion in place the 43dc and 4488 entries in the legacy list matched no documented Mac.

I took the "drop them" branch rather than keeping them with an explanation, because keeping them would only re-arm the WPA3 break on any board whose T2 chip the check failed to see, while dropping them changes nothing for real hardware. The legacy list is now 14e4:(43ba|43bb|43bc|43a3) (BCM43602 variants and BCM4350) in both install/hardware/apple/fix-brcmfmac-supplicant.sh and migrations/1786391100.sh.

The T2 check is now load-bearing rather than redundant, so it is pinned by tests, which is the improvement you flagged as optional: brcmfmac-supplicant-test.sh and brcmfmac-wpa3-cleanup-test.sh each gained T2_HARDWARE=1 cases with 43dc and 4488 (no quirk written; the legacy migration skips; the cleanup removes an existing block). Deleting the 106b:180[12] exclusion from the installer, from 1786391100.sh or from the cleanup gate now fails both suites.

On the supplicant history: confirmed. Current wpa_supplicant.c has no PORT_AUTHORIZED handling, so Broadcom's 41638606 is gone, and Arch ships 2:2.12-1 built 2026-08-10. I recorded that in the installer comment as the reason the quirk is a supplicant workaround rather than a firmware one, which is what justifies excluding the T2 group as a whole.

Also fixed the stale note in migrations/1786391100.sh that claimed T2 installs already carry the block from the installer, and the PR description, which still named the chips incorrectly and said every T2 Mac has BCM4364.

Tests

brcmfmac-supplicant-test.sh (18 assertions) and brcmfmac-wpa3-cleanup-test.sh (12 assertions) pass, as does test/cli. omarchy-kernel-migration-test.sh fails, but it fails identically on the base commit — it is an unrelated pre-existing failure in the limine migration 1789325478.sh.

@llstrk

llstrk commented Sep 27, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Follow-up to the earlier automated review and the author's reply, checked at 672e034.

Verified: both earlier findings are resolved.

Earlier item Status at 672e034
Cleanup skipped an Omarchy block with lines after it Resolved
Not every T2 Mac carries BCM4364 Resolved (still no BCM4355 or BCM4377 hardware check)
Optional test improvement: T2 exclusion not pinned by tests Partly resolved, see below
Documentation note in 1786391100.sh Partly resolved, see below
  • Cleanup: in 35 isolated cleanup shapes with stubbed lspci, sudo and omarchy-state, 1790165000.sh removes either exact Omarchy block wherever it sits (start, middle, end, adjacent or repeated blocks, no final newline). It keeps the other lines' content byte for byte and requests reboot-required before the edit, only when something changed. CRLF, trailing-space, reworded and administrator-merged variants are left untouched with no reboot request. Symlinks are written through, an unreadable file fails the migration, and a second run only reads the file. The previous cleanup left an Omarchy block behind in 13 of these shapes. The new "user line after the block" test fails against it. Nine upgrade sequences through the real omarchy-migrate, plus one on a local merge with current quattro, ended as expected.
  • Chip names: 43dc (BCM4355) and 4488 (BCM4377) now match brcm_hw_ids.h and kernel commits 69005e67ce54 and bf8bbd903f07 in the comments, tests and description, and both are out of the legacy list in the installer and 1786391100.sh.
  • The earlier mechanism statements (FWSUP bit 13, SAE bit 19, SAE_OFFLOAD advertisement, wpa_supplicant dropping SAE key management) still hold. Both suites pass at 672e034 (18 and 12 assertions) and on the merge with quattro, and fail against the base code.

One new issue, two small leftovers and a note on related PRs follow.

The fix depends on Arch's downstream wpa_supplicant patch, not on upstream

The description says hostap commit 41638606 "is gone from current wpa_supplicant", and the author's reply bases this on wpa_supplicant.c. That commit changed wpa_supplicant/events.c, and it is still upstream:

Source 41638606 present?
hostap hostap_2_12 yes, events.c:4928-4944 ("wait for driver port authorized indication")
hostap main yes, events.c:5121-5137; no upstream revert
Arch wpa_supplicant 2:2.12-1 (built 2026-08-10, served by the Omarchy mirrors) no, removed by 0008-Revert-Mark-authorization-completed-on-driver-indica.patch, first shipped in this release

Mainline brcmfmac reports port authorization only for 802.1X fast-transition roams (cfg80211.c:6488-6490), never for firmware-offloaded PSK or SAE connects. With 41638606 active, wpa_supplicant waits for an event brcmfmac does not send. This is the failure the t2linux guide still documents.

Impact: on current Omarchy the premise holds, because the mirrors serve the patched package. But dropping the quirk on T2 and BCM4364 Macs relies on Arch keeping that downstream revert. A future wpa_supplicant release without it would likely break WPA2-PSK and WPA3-SAE association on those Macs again. This is derived from source reading, not a hardware run. The installer comment "Arch's 2.12 carries the fix" is accurate but does not say the fix is downstream.

Suggested change: say in the description that upstream hostap 2.12 and main still contain 41638606 and that Arch's 2:2.12-1 reverts it downstream. Name the Arch patch in the installer comment, so a wpa_supplicant update that drops it is recognisable as the trigger to revisit this.

Smaller items

Optional test improvement: the reply says deleting the 106b:180[12] exclusion from any of the three gates "now fails both suites". In mutant runs, deleting it from the installer or from 1786391100.sh leaves both suites passing. Only the cleanup-gate deletion is caught, by the cleanup suite. With 43dc and 4488 out of the legacy lists, the legacy-ID check alone keeps the quirk off every tested T2 ID, so the comments at brcmfmac-supplicant-test.sh:90-92 and :157-158, which call the T2 check "the only thing" keeping the quirk off these IDs, are inaccurate. Reword them, or add T2_HARDWARE=1 cases with a legacy ID such as 43ba (no quirk written, 1786391100.sh skips) if the defensive check should be pinned.

Documentation note: the new sentence at 1786391100.sh:19-21, "No install gets the quirk from the installer any more", contradicts the installer, which still writes it on pre-T2 Macs, the only machines this migration now targets. For example: "T2 installs no longer get the quirk from the installer; on pre-T2 Macs the installer covers new installs and this migration covers existing ones."

Related open PRs: two open PRs touch the same installer gate.


Review information

Test scope: follow-up source review of 672e034 against the earlier reviewed head 6c7353c, the merge base and current quattro, plus Linux mainline brcmfmac, hostap (2.11, 2.12, main), Arch wpa_supplicant packaging and the t2linux wiki. Isolated command-only runs with stubbed lspci, sudo and omarchy-state and redirected config paths covered the cleanup edge cases, installer and migration gate probes, upgrade sequences through the real migration runner, both PR suites and gate-deletion mutants. The stubbed sudo runs as the invoking user, so real privilege paths were not exercised. No Apple or Broadcom hardware was available; association behavior is inferred from source, not reproduced. The author's test/cli and omarchy-kernel-migration-test.sh results were not rerun.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Sep 27, 2026
The installer's claim that hostap 41638606054a is gone from wpa_supplicant
was wrong: it is still in hostap 2.12 and main, and what actually clears the
brcmfmac association timeouts is Arch's downstream revert of it
(patches/0008-Revert-Mark-authorization-completed-on-driver-indica.patch,
shipped in 2:2.12-1). Name the patch so a future wpa_supplicant release that
drops it is recognisable as the trigger to revisit the quirk.

Also fix the legacy migration's stale note about no install getting the
quirk from the installer, and add cases that pin the T2 check on its own:
with 43dc and 4488 out of the legacy lists, deleting 106b:180[12] from the
installer or from 1786391100.sh left both suites passing.
@thedavidweng

thedavidweng commented Sep 28, 2026 •

Copy link
Copy Markdown
Author

All three items were real. Fixed in a1dc829d, plus a description update.

1. The fix depends on Arch's downstream patch, not on upstream

Confirmed, and my earlier answer was wrong on the mechanism. I checked the sources rather than wpa_supplicant.c:

$ git -C hostap tag --contains 41638606054a09867fe3f9a2b5523aa4678cbfa5
hostap_2_12
hostap_2_11
2_12-bp

$ git -C hostap merge-base --is-ancestor 41638606054a... origin/main && echo CONTAINS
CONTAINS

The commit is in hostap_2_12 and main, and there is no upstream revert of it. What clears the regression here is Arch's downstream revert, added in packaging commit cef15ba (May 2026) from Fedora:

$ git -C arch-wpa tag --contains cef15ba
2-2.12-1

That tag list is the evidence for "first shipped in 2:2.12-1" — the patch commit sits directly between upgpkg: 2:2.11-6 and 2:2.12-1 on the first-parent chain, so no earlier release carried it. The patch is 0008-Revert-Mark-authorization-completed-on-driver-indica.patch, and its diff against wpa_supplicant/events.c restores the pre-41638606 behavior, which matches your description of what brcmfmac needs.

So the premise holds on Omarchy because the mirrors serve the patched package, and the change is conditional on Arch keeping that patch. Both the installer comment and the description now say so explicitly and name the patch, so a wpa_supplicant release that drops it reads as the trigger to revisit the T2 and BCM4364 exemptions.

2. T2 exclusion was not pinned by tests

Confirmed, and I reproduced the mutants rather than taking the report on faith. With 43dc and 4488 out of the legacy lists, deleting 106b:180[12] from the installer or from 1786391100.sh left both suites green; only the cleanup-gate deletion was caught.

Rather than only rewording the comments, I pinned the check. A T2 Mac reporting a legacy part is not a real configuration, which is exactly why no documented hardware exercises the check on its own, so brcmfmac-supplicant-test.sh now covers T2_HARDWARE=1 with 43ba twice: the leaf writes no quirk, and the migration skips without escalating. Re-running all three mutants on the new head:

Mutation supplicant suite cleanup suite
drop T2 check from the installer fails passes
drop T2 check from 1786391100.sh fails passes
drop T2 check from the cleanup gate passes fails

Each gate is now caught by the suite that owns it, so the claim in the previous reply holds. The two comments that called the T2 check "the only thing" excluding 43dc/4488 are reworded: both gates already exclude those IDs, and the new cases carry the T2 check itself. Suite is now 20 assertions.

3. Documentation note in 1786391100.sh

Fixed. The sentence now reads that T2 installs no longer get the quirk from the installer, while on the pre-T2 Macs this migration targets, the installer covers new installs and this covers existing ones.

Related PRs

Both are now called out in a Related open PRs section in the description, since neither is a change in this branch:

  • Install Apple Broadcom Wi-Fi firmware on every Mac brcmfmac drives, not just T2 #10306 puts omarchy-pkg-add apple-bcm-firmware inside the branch this PR narrows to pre-T2 IDs. I confirmed from its diff that the package step is inside the if body, and that its pacman.sh and 1787847645.sh use the old, wider ID list including 4464, so rebasing it as-is would drop the firmware on a fresh BCM4364 iMac19,x. Gating the firmware install separately from the quirk gate avoids that.
  • Fix WPA3 on BCM4364 T2 Macs #9803 writes # Broadcom's firmware WPA handling fails on affected Apple hardware, ... above the same options line. The cleanup matches blocks literally, so it would not remove a block with that wording. Landing this PR first avoids the question entirely; if Fix WPA3 on BCM4364 T2 Macs #9803 lands first, the cleanup needs a third owned-block variant. I can add that variant if you would rather have the ordering hedge.

Hardware verification on MacBookPro15,2 (2026-09-30)

This machine

$ lspci -nn | grep -E '14e4:|106b:180'
01:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4364 802.11ac Wireless Network Adapter [14e4:4464] (rev 03)
02:00.1 Non-VGA unclassified device: Apple Inc. T2 Bridge Controller [106b:1801] (rev 01)
02:00.2 Non-VGA unclassified device: Apple Inc. T2 Secure Enclave Processor [106b:1802] (rev 01)

$ cat /sys/class/dmi/id/product_name
MacBookPro15,2

$ journalctl -k -b | grep 'brcmf_c_preinit_dcmds'
brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4364/3 wl0: Jul 10 2023 12:30:19 version 9.30.503.0.32.5.92 FWID 01-88a8883

This is the exact machine in the PR's "Before" section: BCM4364 + T2, firmware
9.30.503.0.32.5.92 FWID 01-88a8883. It is not a substitute for BCM4355/BCM4377,
but it is the primary subject of the fix, verified on the real thing.

Before state: confirmed live

/etc/modprobe.d/brcmfmac.conf still holds the Omarchy block from install time
(mtime 2026-09-10):

options brcmfmac feature_disable=0x82000

Runtime effect on the brcmfmac phy (phy0 = wlp1s0):

SAE_OFFLOAD                ABSENT
4WAY_HANDSHAKE_STA_PSK     ABSENT
4WAY_HANDSHAKE_STA_1X      ABSENT
4WAY_HANDSHAKE_AP_PSK      present

That is the whole mechanism, observed rather than inferred.

Bit math, from the driver's own header

BRCMF_FEAT_LIST in drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
enumerates the features in bit order: FWSUP is bit 13, SAE is bit 19,
FWAUTH is bit 20, SAE_EXT is bit 25. So:

feature_disable=0x82000 -> bits 13, 19 -> disables FWSUP + SAE
FWAUTH (bit 20) NOT set        SAE_EXT (bit 25) NOT set

Why that removes SAE_OFFLOAD (v7.2, the running kernel line)

cfg80211.c, identical in v7.2 and current main:

if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWSUP)) {
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK);
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X);
        if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE))
                wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_SAE_OFFLOAD);
}
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWAUTH)) {
        wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK);
        ...
}
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE_EXT))
        wiphy->features |= NL80211_FEATURE_SAE;

SAE_OFFLOAD is nested inside the FWSUP guard and gated on SAE, so disabling
FWSUP alone already removes it. SAE_OFFLOAD_AP sits under FWAUTH (bit 20), which
0x82000 does not touch — which is exactly why 4WAY_HANDSHAKE_AP_PSK is still
present above while all three STA-side features are gone. The live output is a
direct readout of the bit pattern.

This also closes the SAE_EXT question the review raised: BRCMF_FEAT_SAE_EXT is
referenced in exactly two places in the driver (the NL80211_FEATURE_SAE advert
above, and the feature-name table). There is no SAE_EXT code path behind it, so
with SAE offload disabled the driver offers neither route to WPA3-SAE.

PR scripts run against this hardware

Paths redirected into a sandbox so /etc was never written; the real
/etc/modprobe.d/brcmfmac.conf and the loaded module were left untouched, since
this session's default route runs over wlp1s0.

Script Result on this machine
installer leaf writes no config — correct, BCM4364 + T2 is excluded
1790165000.sh (WPA3 cleanup) removed the real quirk block, set reboot-required
1786391100.sh (legacy) skipped, zero privileged calls

The cleanup's calls on the real file content:

sudo  cat .../brcmfmac.conf
omarchy-state  set reboot-required
sudo  rm -f .../brcmfmac.conf

That is the file currently in /etc, byte for byte, including its 4-line Omarchy
comment — so the exact-matching path removes it as a whole file rather than
stranding the block.

The legacy migration's gate was checked in both directions on this box: with the
real lspci (BCM4364 + T2) it made no privileged calls; with lspci stubbed to
BCM43602 and no T2 it appended the block and set reboot-required; and with a
T2 present plus BCM43602 it again made no calls, confirming the T2 check alone
holds the gate — the shape the newly added test case covers.

After state: not captured

Requires a module reload, which needs root and would drop the session's default
route. sudo requires a password here, so it was not attempted. The claim
"SAE_OFFLOAD returns once the block is gone" is therefore still inferred from the
source above, not measured. The block is still in place and the machine still
runs the workaround; a reboot after removing it would close this.

@llstrk

llstrk commented Oct 1, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: one documentation issue remains in the Live tests section; at a1dc829 all three items from the previous review are resolved, as the reply states.

Live tests: after-state provenance is unclear

The description says iw phy showed SAE_OFFLOAD after the fix on both the MacBookPro15,2 and 16,1. The reply says the MacBookPro15,2 after-state was "not captured" and is "still inferred". The quoted iw lines (ABSENT/present, "SAE authentication offload") also do not match what iw prints. Impact: documentation only, but it is the PR's only after-state evidence.

Suggested change: state which results were measured on which machine, mark the rest as expected, and paste literal output or name the command used.

Evidence (source reading and text comparison, not a hardware run)

Live tests: after-state provenance and iw transcripts (documentation note)

Kind: source reading plus a text comparison of the PR description and the author's reply. Not a runtime reproduction; no Apple or Broadcom hardware was used.

The two statements

PR description (current text):

After, on BCM4364 (MacBookPro16,1 and MacBookPro15,2):

  • iw phy advertises * [ SAE_OFFLOAD ]: SAE authentication offload.

The after-state above was captured on separate reboots of two machines; the "before" state reported here is the same firmware revision.

Author reply, hardware section (edited 2026-09-30):

After state: not captured

... The claim "SAE_OFFLOAD returns once the block is gone" is therefore still inferred from the source above, not measured.

What iw actually prints

iw prints only the extended features that are present, one line each, in the form * [ NAME ]: description. It never prints an ABSENT marker, and the SAE_OFFLOAD description has been SAE offload support since the feature was added to iw in 2019.

$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git && cd iw
$ git log -1 --format=%h
e86c546
$ grep -n 'ext_feat_case(SAE_OFFLOAD' info.c
143:	ext_feat_case(SAE_OFFLOAD, "SAE offload support");
157:	ext_feat_case(SAE_OFFLOAD_AP, "AP mode SAE authentication offload support");
$ git log -p -G'SAE_OFFLOAD, "' --format='commit %h %ad' --date=short -- info.c | grep -E '^commit|^[+-].*SAE_OFFLOAD, "'
commit 0976378 2022-05-27
+	ext_feat_case(SAE_OFFLOAD, "SAE offload support");
-		ext_feat_print(tb, SAE_OFFLOAD, "SAE offload support");
commit b5c0c33 2019-08-05
+		ext_feat_print(tb, SAE_OFFLOAD, "SAE offload support");
$ sed -n '864,870p' info.c
		printf("\tSupported extended features:\n");

		for (feat = 0; feat < NUM_NL80211_EXT_FEATURES; feat++) {
			if (!ext_feature_isset(nla_data(tb), nla_len(tb), feat))
				continue;
			ext_feat_print(feat);
		}
$ git grep -n -i -w 'absent' -- '*.c' | wc -l
0

So iw phy phy0 info | grep -E 'SAE_OFFLOAD|4WAY_HANDSHAKE' on a phy with only 4WAY_HANDSHAKE_AP_PSK set prints one * [ 4WAY_HANDSHAKE_AP_PSK ]: AP mode PSK offload support line, not the four ABSENT/present lines shown under "Mechanism, verified on the affected hardware". The After line's SAE authentication offload text is not what iw prints for SAE_OFFLOAD.

Related public evidence

Issue #9802 reports a measured after-state on a MacBookPro16,1 (BCM4364B3, firmware 9.30.514.0.32.5.94): reloading brcmfmac with feature_disable=0 exposed SAE_OFFLOAD and a WPA3-only network connected. The MacBookPro15,2 in this PR runs firmware 9.30.503.0.32.5.92.

Details: Verified, small corrections, related PRs

Verified:

  • hostap 41638606 is in hostap_2_12 and main; Arch's revert first ships in 2:2.12-1 (built 2026-08-10), which the Omarchy mirrors serve. brcmfmac reports port authorization only on 802.1X fast-transition roams (v7.2, 7.2.8, mainline).
  • Both suites pass at a1dc829 (20 and 12 assertions) and on a local merge with quattro 8b4eae6. Deleting the T2 check from each gate now fails the suite that owns it (table below).
  • The new 1786391100.sh sentence matches both gates.
  • The Related open PRs section describes Install Apple Broadcom Wi-Fi firmware on every Mac brcmfmac drives, not just T2 #10306 (5a5d5b1) and Fix WPA3 on BCM4364 T2 Macs #9803 (7f04107) accurately.
  • 1790165000.sh is unchanged since the previous review.

Small corrections (optional):

  • The Arch patch sits at the packaging repository root, not under patches/ (installer comment and description).
  • Description: BRCMF_FEAT_SAE_EXT's second reference is the firmware capability map (brcmf_fwcap_map), and cyw/core.c does have a user-space SAE (external_auth) path. The Apple parts use the WCC ops, which have none, so the conclusion holds for these Macs.

Related open PRs: #11259 and #13362 also edit the installer leaf and conflict textually with this PR's fix-brcmfmac-supplicant.sh. #11259 also conflicts in 1786391100.sh, where both narrowed gates would need rewriting with its sysfs helper; the new T2 test cases merge unchanged.

T2 gate deletions against both suites (verification of the earlier optional test item, not a finding)

Kind: isolated command-only run with the suites' own stubbed lspci, sudo and omarchy-state. Run from a checkout of the PR; writes only under mktemp -d.

#!/bin/bash
# Deletes the 106b:180[12] (T2) check from each of the three gates in a
# throwaway copy of the repository and runs both brcmfmac suites against it.
# Usage: bash verify-t2-gates.sh [repo-root]   (writes only under mktemp -d)
set -uo pipefail

root=$(cd -- "${1:-.}" && pwd)
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT

suites=(brcmfmac-supplicant-test.sh brcmfmac-wpa3-cleanup-test.sh)

run_suites() {
  local label=$1 dir=$2 suite out status
  for suite in "${suites[@]}"; do
    out=$(bash "$dir/test/shell.d/$suite" 2>&1)
    status=$?
    if (( status == 0 )); then
      printf '%-22s %-32s passes (%s ok)\n' "$label" "$suite" "$(grep -c '^ok - ' <<<"$out")"
    else
      printf '%-22s %-32s FAILS: %s\n' "$label" "$suite" \
        "$(grep '^not ok - ' <<<"$out" | tail -n 1 | sed 's/^not ok - //')"
    fi
  done
}

copy() {
  local dest="$work/$1"
  mkdir -p "$dest/test"
  cp -r "$root/install" "$root/migrations" "$dest/"
  cp -r "$root/test/shell.d" "$dest/test/"
  printf '%s\n' "$dest"
}

run_suites unmodified "$root"

d=$(copy installer)
sed -i '/^  ! lspci -nn | grep "106b:180\[12\]" >\/dev\/null &&$/d' \
  "$d/install/hardware/apple/fix-brcmfmac-supplicant.sh"
! grep -q '106b:180' "$d/install/hardware/apple/fix-brcmfmac-supplicant.sh" || { echo "installer mutation not applied"; exit 2; }
run_suites "no T2 in installer" "$d"

d=$(copy legacy)
sed -i -e '/^if lspci -nn | grep "106b:180\[12\]" >\/dev\/null ||$/d' \
  -e 's/^  ! { \[\[ \$sys_vendor == Apple\* \]\] &&$/if ! { [[ $sys_vendor == Apple* ]] \&\&/' \
  "$d/migrations/1786391100.sh"
! grep -q '106b:180' "$d/migrations/1786391100.sh" || { echo "legacy mutation not applied"; exit 2; }
bash -n "$d/migrations/1786391100.sh" || { echo "legacy mutation broke syntax"; exit 2; }
run_suites "no T2 in 1786391100" "$d"

d=$(copy cleanup)
sed -i 's/grep -E "106b:180\[12\]|14e4:(4464|4425|4433)"/grep -E "14e4:(4464|4425|4433)"/' \
  "$d/migrations/1790165000.sh"
! grep -q 'grep -E "106b:180' "$d/migrations/1790165000.sh" || { echo "cleanup mutation not applied"; exit 2; }
run_suites "no T2 in 1790165000" "$d"

Actual output at a1dc829:

unmodified             brcmfmac-supplicant-test.sh      passes (20 ok)
unmodified             brcmfmac-wpa3-cleanup-test.sh    passes (12 ok)
no T2 in installer     brcmfmac-supplicant-test.sh      FAILS: a T2 Mac reporting a legacy part does not get the quirk
no T2 in installer     brcmfmac-wpa3-cleanup-test.sh    passes (12 ok)
no T2 in 1786391100    brcmfmac-supplicant-test.sh      FAILS: the legacy migration skips a T2 Mac on a legacy part
no T2 in 1786391100    brcmfmac-wpa3-cleanup-test.sh    passes (12 ok)
no T2 in 1790165000    brcmfmac-supplicant-test.sh      passes (20 ok)
no T2 in 1790165000    brcmfmac-wpa3-cleanup-test.sh    FAILS: the cleanup removes the quirk on a T2 Mac with 14e4:43dc

Same output on a local merge of a1dc829 into quattro 8b4eae6.

Actual output at the previously reviewed head 672e034 (before the two new cases):

unmodified             brcmfmac-supplicant-test.sh      passes (18 ok)
unmodified             brcmfmac-wpa3-cleanup-test.sh    passes (12 ok)
no T2 in installer     brcmfmac-supplicant-test.sh      passes (18 ok)
no T2 in installer     brcmfmac-wpa3-cleanup-test.sh    passes (12 ok)
no T2 in 1786391100    brcmfmac-supplicant-test.sh      passes (18 ok)
no T2 in 1786391100    brcmfmac-wpa3-cleanup-test.sh    passes (12 ok)
no T2 in 1790165000    brcmfmac-supplicant-test.sh      passes (18 ok)
no T2 in 1790165000    brcmfmac-wpa3-cleanup-test.sh    FAILS: the cleanup removes the quirk on a T2 Mac with 14e4:43dc

Review information

Test scope: source review and sandbox tests with stubbed hardware at a1dc829; not tested on Apple or Broadcom hardware.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[High risk] Changes Wi-Fi driver configuration and adds system migration.

The PR should not merge until cleanup can replace a configuration containing administrator settings without risking their loss on a failed write.

Fix All in Claude CodeFindings

  1. P1 Direct rewrite risks settings loss ▶
  2. P2 Unrelated trailing bytes change ▶

Summary

The PR limits the Broadcom handshake quirk to legacy pre-T2 Macs, prevents the legacy migration from restoring it on modern hardware, and adds a migration to remove previously written quirk blocks.

  • The hardware gates and historical block matching are consistent with that purpose.
  • The cleanup needs a safer, byte-preserving replacement path for files containing administrator content.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Install or legacy migration] --> B{Apple, no T2, legacy Broadcom ID?}
  B -- Yes --> C[Apply 0x82000 quirk]
  B -- No --> D[Leave quirk unapplied]
  E[Cleanup migration] --> F{T2 or modern Broadcom ID?}
  F -- No --> G[Leave config alone]
  F -- Yes --> H{Exact historical Omarchy block?}
  H -- No --> G
  H -- Yes --> I[Request reboot and remove block]
Loading

Reviews (1) · Last reviewed commit: "Name the Arch wpa_supplicant revert patc..."

Comment thread migrations/1790165000.sh
sudo rm -f "$conf"
fi
else
printf '%s\n' "$rest" | sudo tee "$conf" >/dev/null

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.

P1 Direct rewrite risks settings loss

When this migration removes an Omarchy block from a file that also contains administrator settings, tee truncates the file before writing the remaining content. If the update is interrupted or the write fails, those settings can be lost or left incomplete. A later retry may no longer find a complete block to remove and can mark the migration finished. Write the replacement completely before changing the original, while retaining the tested symlink behavior.

Fix in Claude Code Fix in Codex Fix in Cursor

Comment thread migrations/1790165000.sh
sudo rm -f "$conf"
fi
else
printf '%s\n' "$rest" | sudo tee "$conf" >/dev/null

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.

P2 Unrelated trailing bytes change

When an owned block is removed, command substitution strips trailing newlines from the retained content, and this printf writes it back with one final newline. A file with trailing blank lines or a surviving last line without a newline therefore changes outside the owned block. This breaks the migration’s byte-preservation promise and makes harmless administrator edits harder to distinguish from cleanup; preserve the original line endings and test the retained content byte-for-byte.

Fix in Claude Code Fix in Codex Fix in Cursor

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 1d3ef557 by Claude Opus 5.5 with a second opinion from Codex Medium.

Tests, on a disposable Omarchy worker. brcmfmac-supplicant-test.sh and brcmfmac-wpa3-cleanup-test.sh pass on this head, and so does ./test/cli. With the head's tests run against the base (quattro at d3cfd53b), the supplicant suite fails on "a T2 Mac does not get the quirk" and the cleanup suite fails because there is no cleanup migration. The worker has no Broadcom radio, so association behaviour was not reproduced. The hardware evidence is the MacBookPro15,2 before and after transcripts in the description, plus the #9802 report.

Competing fix. #9803 fixes the same bug (#9802) by exempting only DMI product MacBookPro16,1. The two reviewers disagree about which one should go forward, so neither is being marked ready and the choice is left to the maintainer:

  • This one fixes the cause for every BCM4364 Mac, not one model: the 15,2 transcripts show SAE_OFFLOAD missing with the block and back without it, and a WPA3-only network joining. Fix WPA3 on BCM4364 T2 Macs #9803's own transition-mode test was on BCM4364 with the quirk off, which supports dropping it for the whole chip.
  • Codex prefers Fix WPA3 on BCM4364 T2 Macs #9803 because this PR also drops the quirk on the T2 BCM4355 (43dc) and BCM4377 (4488) Macs and the T2-less BCM4364 iMac19,x, and none of those has a connection test. On those machines the change depends on Arch keeping its downstream revert of hostap 41638606, which the installer comment now says.

Smaller findings, none blocking:

  • The description says the MacBookPro16,1 Broadcom quirk disables WPA3-SAE #9802 MacBookPro16,1 has no T2. The 2019 16-inch MacBook Pro has a T2, so that result covers BCM4364 on T2 hardware, not the non-T2 path.
  • migrations/1790165000.sh:87 rewrites the file through printf '%s\n' "$rest", so trailing blank lines are dropped and a missing final newline is added. modprobe does not care. The same line truncates the file before writing it, as greptile noted, but the window is a few bytes and other Omarchy migrations write config the same way.
  • The cleanup gate at migrations/1790165000.sh:18 has no Apple vendor check. That is harmless: Omarchy only ever wrote these exact blocks on Apple hardware.

Nothing was pushed. This is waiting on the maintainer to choose between this PR and #9803.

@omarchybot

Copy link
Copy Markdown
Collaborator

Update at the same head, 1d3ef557, because the competing fix has changed. Checked by Claude Opus 5.5 with a second opinion from Codex Medium.

What changed. #9803 was reworked on 2026-10-08. It now exempts BCM4364 (14e4:4464) together with the T2 bridge (106b:180[12]), rather than DMI product MacBookPro16,1. Its cleanup migration removes the exact Omarchy blocks wherever they sit in the file and keeps the other bytes. Both machines with hardware results, the MacBookPro16,1 from #9802 and the MacBookPro15,2 measured here, are now covered by #9803 as well.

Which fix goes forward. Both reviewers now pick #9803. It is the older fix and it fixes the cause of #9802 on every machine that has been tested. This PR changes behaviour on more hardware than that, but none of the extra machines has been tested:

That makes this PR wider in scope, not a better fix for the bug, so the older one wins. Codex agreed. Its agreement isn't guaranteed to be independent: it read both threads, including the earlier review of #9803 that reached the same conclusion.

One thing this PR does better. Its cleanup matches blocks against the original lines in a single pass. #9803 matches repeatedly against text it has already edited, so in a contrived layout (legacy comment, current block, then a bare options brcmfmac feature_disable=0x82000 line) it also removes the bare line. No Omarchy install path writes that layout, and the line it removes is the same quirk the migration exists to take off. The earlier finding here still stands too: this PR's cleanup drops trailing blank lines and adds a missing final newline, and #9803 doesn't.

Because #9803 is the one going forward, this PR was not run on a worker again. The earlier test results at this head still stand. Nothing was pushed. It waits on the maintainer, who can still choose this PR's wider scope over #9803.

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

Labels

bug Something isn't working compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacBookPro16,1 Broadcom quirk disables WPA3-SAE

3 participants