mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aditya Garg <aditya.garg@linux.dev>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
	Andre Eikmeyer <dev@deq.rocks>
Cc: linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
	brcm80211-dev-list.pdl@broadcom.com,
	linux-kernel@vger.kernel.org,
	Yossef Osman <Yossef.Osman@proton.me>
Subject: Re: [PATCH] wifi: brcmfmac: keep ARP and ND offload off on the BCM4364
Date: Wed, 18 Nov 2026 12:38:42 +0530	[thread overview]
Message-ID: <2c40e18f-02c2-48d7-b592-279634700c10@linux.dev> (raw)
In-Reply-To: <20261116203719.281605-1-arend.vanspriel@broadcom.com>



On 17/11/26 02:07, Arend van Spriel wrote:
> On Wed, 4 Nov 2026 16:16:20 +0100, Andre Eikmeyer <dev@deq.rocks> wrote:
>> brcmfmac enables the firmware's ARP and IPv6 ND offload (ndoe) whenever
>> the interface is up and not promiscuous. On the Apple firmware for the
>> BCM4364, ndoe makes IPv6 downloads collapse.
> 
> [...]
> 
>> ---
>>  .../net/wireless/broadcom/brcm80211/brcmfmac/core.c    | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
> 
>> @@ -103,6 +104,15 @@ void brcmf_configure_arp_nd_offload(struct brcmf_if *ifp, bool enable)
>>  		return;
>>  	}
>>
>> +	/* With ND offload on while awake, the Apple firmware for the BCM4364
>> +	 * makes IPv6 downloads drop to low rates. macOS runs ARP and ND
>> +	 * offload only in sleep, keep both off on this chip.
>> +	 */
>> +	if (enable && ifp->drvr->bus_if->chip == BRCM_CC_4364_CHIP_ID) {
>> +		brcmf_dbg(TRACE, "Skip ARP/ND offload enable on BCM4364\n");
>> +		enable = false;
>> +	}
>> +
>>  	if (enable)
>>  		mode = BRCMF_ARP_OL_AGENT | BRCMF_ARP_OL_PEER_AUTO_REPLY;
>>  	else
> 
> A few comments:
> 
> 1) The measurements only implicate ndoe. Do you have data showing arpoe
> also needs to be off? Otherwise please limit this to ND offload.

Limiting this to ND offload works for my MacBook Pro 16,1. We have also got a bug report stating BCM4355 is also affected.> 
> 2) The commit message says this is an issue of the Apple firmware, but the
> check is on the chip ID only. The same chip IDs are also used with other
> firmware builds and boards (WCC/non-Apple), which would lose the feature
> needlessly. Please restrict the quirk to the affected platform, e.g. with
> the Apple board type (settings->board_type) or a per-firmware quirk, or
> move it to the vendor feat_attach callback instead of a chip check in
> this helper. The same applies to the other chip ID quirks of this batch
> (txbf and FWAUTH).
> 
> 3) This looks like a bug fix. Please add a Fixes: tag and Cc: stable (as
> Aditya suggested), and mark the target tree in the subject.
> 
> [...]
> 
> Regards,
> Arend

Arend and Andre, could you see if this works:

-->8--

From 4dce3bc04ce25711e03f8430283a87136726e46c Mon Sep 17 00:00:00 2001
From: Aditya Garg <aditya.garg@linux.dev>
Date: Wed, 18 Nov 2026 06:05:59 +0000
Subject: [PATCH] wifi: brcmfmac: keep ND offload off on the BCM4355 and
 BCM4364 while awake

brcmfmac enables the firmware's ARP and IPv6 ND offload (ndoe) whenever
the interface is up and not promiscuous. On the Apple firmware for the
BCM4355 and BCM4364, ndoe makes IPv6 downloads collapse.
MacBookPro15,1 with BCM4364/3, IPv6 downloads topped out at 55 Mbit/s.
Same behaviour on the MacBookPro16,1 with the later chip revision and
MacBookAir8,1 with BCM4355. Also tested on BCM4377 and turned out this
chip is not affected.

macOS runs these offloads only in sleep. It enables them on suspend
and disables them on wake. Keep them off on the BCM4355 and BCM4364.

Signed-off-by: Aditya Garg <aditya.garg@linux.dev>
Cc: stable@vger.kernel.org
---
 .../broadcom/brcm80211/brcmfmac/core.c         | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 92ec269f43b2..d054d33f3456 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -13,6 +13,7 @@
 #include <net/addrconf.h>
 #include <net/ieee80211_radiotap.h>
 #include <net/ipv6.h>
+#include <brcm_hw_ids.h>
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
 
@@ -97,6 +98,7 @@ void brcmf_configure_arp_nd_offload(struct brcmf_if *ifp, bool enable)
 {
 	s32 err;
 	u32 mode;
+	bool nd_enable = enable;
 
 	if (enable && brcmf_is_apmode_operating(ifp->drvr->wiphy)) {
 		brcmf_dbg(TRACE, "Skip ARP/ND offload enable when soft AP is running\n");
@@ -125,7 +127,21 @@ void brcmf_configure_arp_nd_offload(struct brcmf_if *ifp, bool enable)
 		}
 	}
 
-	err = brcmf_fil_iovar_int_set(ifp, "ndoe", enable);
+	/* With ND offload on while awake, the Apple firmware for the BCM4355
+	 * and BCM4364 makes IPv6 downloads drop to low rates. macOS runs ND
+	 * offload only in sleep, keep it off on this chip.
+	 */
+	if (nd_enable &&
+	    (ifp->drvr->bus_if->chip == BRCM_CC_4355_CHIP_ID ||
+	     ifp->drvr->bus_if->chip == BRCM_CC_4364_CHIP_ID) &&
+	    ifp->drvr->settings->board_type &&
+	    !strncmp(ifp->drvr->settings->board_type, "apple,", 6)) {
+		brcmf_dbg(TRACE, "Skip ND offload enable on BCM%x, board_type=%s\n",
+			  ifp->drvr->bus_if->chip, ifp->drvr->settings->board_type);
+		nd_enable = false;
+	}
+
+	err = brcmf_fil_iovar_int_set(ifp, "ndoe", nd_enable);
 	if (err) {
 		brcmf_dbg(TRACE, "failed to configure (%d) ND offload err = %d\n",
 			  enable, err);
-- 
2.56.0


-->8--

Andre needs to sign this off and add his authorship if this is submitted btw.

  reply	other threads:[~2026-11-18  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 15:16 Andre Eikmeyer
2026-11-06 12:06 ` Aditya Garg
2026-11-16 20:37 ` Arend van Spriel
2026-11-18  7:08   ` Aditya Garg [this message]
2026-11-18  9:42   ` André Eikmeyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c40e18f-02c2-48d7-b592-279634700c10@linux.dev \
    --to=aditya.garg@linux.dev \
    --cc=Yossef.Osman@proton.me \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=dev@deq.rocks \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®