Repository navigation
Conversation
Apple AQC113 firmware on Apple silicon desktops reports l2_filters_base_index 9 and l2_filter_count 29 (slots 9..37). The station MAC is programmed at that slot and tagged for the action resolver, and multicast addresses are programmed just above it. Broadcast uses a separate enable, so ARP still arrives. hw_atl2_hw_packet_filter_set() then calls the A1 helper, which walks every L2 slot from HW_ATL_B0_MAC_MIN (1) and leaves a slot on only when its index is at most mc_list_count. With fewer than nine addresses that clears the station filter at slot 9, and it clears multicast slots in every case, so unicast to the netdev MAC and IPv6 router advertisements are dropped. Promiscuous mode sets the L2 promisc bit and hides it. Start the walk at the first multicast slot and treat mc_list_count as a count of slots from there. Pass the end of the firmware window: the helper used to stop at HW_ATL_B0_MAC_MAX, so entries 24..28 in slots 33..37 stayed enabled with stale addresses when the list shrank or IFF_MULTICAST was cleared. On A1 the first slot is still 1 and the end is still HW_ATL_B0_MAC_MAX, so the enabled set is unchanged. Refuse a multicast list that does not fit in the firmware window (one slot is the station address). Comparing against the whole hardware table writes past that window. A reported l2_filter_count of zero makes the fit check true for an empty list, so aq_nic_start() fails and the link does not come up. Clamp a zero count, or a window that runs past HW_ATL2_MAC_MAX, to the slots that remain above the base index. Mac Studio M2 Max (J475c), ATL2FW 1.3.27: DHCP, IPv6 SLAAC and unicast work with promiscuity 0. Based on the linux-asahi change d96f2a3 by Janne Grunau (AsahiLinux/linux, branch asahi). That version keeps the i <= mc_list_count test, which no longer matches once the walk starts above the base index; compare the offset from the first multicast slot instead. Fixes: 6c1ca11 ("net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address") Link: omacom/omarchy-mac-pkgs#137 Assisted-by: Grok:grok-4.7-build-fast Assisted-by: Claude:claude-fable-5-2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Apple silicon desktops the AQC113 (ATL2) stops receiving unicast frames and IPv6 router advertisements once promiscuous mode is off. DHCP and SLAAC then fail. Broadcast still arrives, and turning promiscuous mode on hides the bug because that path sets a separate L2 promiscuous bit.
Cause
Apple's firmware configuration reports
l2_filters_base_index9 andl2_filter_count29, so the L2 window is slots 9..37. The station MAC is programmed at slot 9 and tagged for the action resolver. Multicast addresses are programmed just above it.hw_atl2_hw_packet_filter_set()calls the A1 helper, which walks every slot fromHW_ATL_B0_MAC_MIN(1) and leaves a slot on only when its index is at mostmc_list_count. With fewer than nine addresses that clears the station filter at slot 9, and it clears multicast slots in every case.The same helper stops at
HW_ATL_B0_MAC_MAX(slot 33). Entries 24..28 land in slots 33..37 and stay enabled with stale addresses when the list shrinks orIFF_MULTICASTis cleared.A multicast list used to be bounded by the whole hardware table (
HW_ATL2_MAC_MAX - HW_ATL2_MAC_MIN). Comparing against the whole hardware table writes past the firmware window.Fix
Start the walk at the first multicast slot (
l2_filters_base_index + 1) and treatmc_list_countas a count of slots from there, not as an absolute slot number. Pass the end of the firmware window (min(HW_ATL2_MAC_MAX, base + count)) so slots through 37 are cleared with the list. On A1 the first slot is still 1 and the end is stillHW_ATL_B0_MAC_MAX, so the enabled set is unchanged. A0 has its own function.Refuse a list that does not fit in the firmware window. One slot is the station address, so at most
l2_filter_count - 1multicast addresses fit.If the firmware reports
l2_filter_count0, or a window that runs pastHW_ATL2_MAC_MAX, clamp the count to the slots that remain above the base index. A zero count would make the fit check true for an empty list,aq_nic_start()would fail, and the link would not come up.Tested on hardware
Mac Studio M2 Max (J475c), AQC113 with firmware ATL2FW 1.3.27, linux-aurora 7.2.11.aurora14 with this commit, promiscuous mode off (NetworkManager
accept-all-mac-addressesdisabled,promiscuity 0): DHCP lease in 0.15 s, IPv6 SLAAC addresses from router advertisements, and unicast IPv4/IPv6 pings to the router and another host all work. Without the fix the same machine gets link and transmits, but never completes DHCP or SLAAC unless promiscuous mode is on (the report in omacom/omarchy-mac-pkgs#137 is the same bug on an M2 Ultra).ludagoois not listed in.github/VOUCHED.td, so CI will not build this pull request until a maintainer appliesci:build.Not tested
Known limitation
A list of 29..32 addresses is refused with
-EBADRQC.aq_nic_set_multicast_list()still decides allmulti/promisc fallback fromAQ_HW_MULTICAST_ADDRESS_MAX(32) ataq_nic.c, and returns before applying the packet filter when the hardware list set fails.aq_ndev_set_multicast_settings()discards that error.mc_list.countstays in 29..32, so the nextaq_nic_start()fails until the list shrinks. That needs 29 or more L2 addresses. It is still better than the current out-of-table writes. The complete fallback is the per-chip op in linux-asahi179bf209fccf(five files) and is not in this pull request.Credit
Based on the linux-asahi change
d96f2a368faaby Janne Grunau (AsahiLinux/linux, branch asahi). That version keeps thei <= mc_list_counttest, which no longer matches once the walk starts above the base index. This patch compares the offset from the first multicast slot instead.Link: omacom/omarchy-mac-pkgs#137
Fixes: 6c1ca11 ("net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address")
🤖 Generated with Claude Code