mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wifi: brcmfmac: disable TX beamforming on BCM4364
@ 2026-11-04 15:16 Andre Eikmeyer
  2026-11-16 20:37 ` Arend van Spriel
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Eikmeyer @ 2026-11-04 15:16 UTC (permalink / raw)
  To: arend.vanspriel
  Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl, linux-kernel,
	Andre Eikmeyer, Yossef Osman, Aditya Garg

With "txbf" enabled, the BCM4364 firmware (9.30.514.0.32.5.94, as shipped
by Apple for the MacBookPro15,1) transmits a single beamformed spatial
stream (nrate VHT MCS9 NSS1 TXBF) towards a two stream AP. With "txbf"
cleared it picks two streams (VHT MCS9 NSS2) on its own. The firmware
enables "txbf" by default, so the driver has to clear it.

Measured with iperf3 against a wired server on the same AP:

  0.5 m from the AP, -36 dBm:  351 -> 623 Mbit/s uplink
  -70 dBm:                      96-130 -> 149-175 Mbit/s uplink

Downlink and latency are unchanged. I did not notice any refression.

Tested-by: Yossef Osman <Yossef.Osman@proton.me>
Tested-by: Aditya Garg <aditya.garg@linux.dev>
Signed-off-by: Andre Eikmeyer <dev@deq.rocks>
---
The KaiT2en community runs this patch with its kernels, no regression
was reported.

 .../net/wireless/broadcom/brcm80211/brcmfmac/common.c    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index b6027d83e6a..b09abd5fee3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -10,6 +10,7 @@
 #include <linux/firmware.h>
 #include <brcmu_wifi.h>
 #include <brcmu_utils.h>
+#include <brcm_hw_ids.h>
 #include "core.h"
 #include "bus.h"
 #include "debug.h"
@@ -450,8 +451,12 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
 		goto done;
 	}
 
-	/* Enable tx beamforming, errors can be ignored (not supported) */
-	(void)brcmf_fil_iovar_int_set(ifp, "txbf", 1);
+	/* Enable tx beamforming, errors can be ignored (not supported).
+	 * BCM4364 firmware enables it by default and then transmits a single
+	 * beamformed stream instead of two, halving its uplink throughput.
+	 */
+	(void)brcmf_fil_iovar_int_set(ifp, "txbf",
+				      drvr->bus_if->chip != BRCM_CC_4364_CHIP_ID);
 done:
 	return err;
 }

base-commit: 991a73f4909f1348ffb4b38765cdb522a775e4c2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] wifi: brcmfmac: disable TX beamforming on BCM4364
  2026-11-04 15:16 [PATCH] wifi: brcmfmac: disable TX beamforming on BCM4364 Andre Eikmeyer
@ 2026-11-16 20:37 ` Arend van Spriel
  0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2026-11-16 20:37 UTC (permalink / raw)
  To: Andre Eikmeyer
  Cc: arend.vanspriel, linux-wireless, brcm80211,
	brcm80211-dev-list.pdl, linux-kernel, Yossef Osman, Aditya Garg

On Wed, 4 Nov 2026 16:16:23 +0100, Andre Eikmeyer <dev@deq.rocks> wrote:
> With "txbf" enabled, the BCM4364 firmware (9.30.514.0.32.5.94, as shipped
> by Apple for the MacBookPro15,1) transmits a single beamformed spatial
> stream (nrate VHT MCS9 NSS1 TXBF) towards a two stream AP. With "txbf"
> cleared it picks two streams (VHT MCS9 NSS2) on its own. The firmware
> enables "txbf" by default, so the driver has to clear it.
>
> [...]
>
> Tested-by: Yossef Osman <Yossef.Osman@proton.me>
> Tested-by: Aditya Garg <aditya.garg@linux.dev>
> Signed-off-by: Andre Eikmeyer <dev@deq.rocks>

[...]

> @@ -450,8 +451,12 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
>  		goto done;
>  	}
>
> -	/* Enable tx beamforming, errors can be ignored (not supported) */
> -	(void)brcmf_fil_iovar_int_set(ifp, "txbf", 1);
> +	/* Enable tx beamforming, errors can be ignored (not supported).
> +	 * BCM4364 firmware enables it by default and then transmits a single
> +	 * beamformed stream instead of two, halving its uplink throughput.
> +	 */
> +	(void)brcmf_fil_iovar_int_set(ifp, "txbf",
> +				      drvr->bus_if->chip != BRCM_CC_4364_CHIP_ID);
>  done:
>  	return err;
>  }

The chip ID check has the same problem as in the ARP/ND offload patch [1]:
the issue is described as specific to the firmware shipped by Apple
(9.30.514.0.32.5.94), but the quirk applies to every BCM4364. Please
restrict it as suggested there.

Also, the comment says "Enable tx beamforming" while the code now
conditionally disables it. Please make the code self-explanatory, e.g. a
local variable or an explicit if (chip == BRCM_CC_4364_CHIP_ID) with the
txbf value spelled out, instead of passing a bool expression as the
iovar value.

Minor: typo "refression" in the commit message, and the subject lacks
the target tree (wireless-next) which wifibot flagged.

Since this is a throughput quirk (not a fix) I would also like to know
whether TX beamforming is functional at all on the BCM4364 or just
mis-selected by rate control, so the commit message can state the actual
root cause.

[1] https://lore.kernel.org/all/20261104151620.70671-1-dev@deq.rocks/

Regards,
Arend

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-16 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 15:16 [PATCH] wifi: brcmfmac: disable TX beamforming on BCM4364 Andre Eikmeyer
2026-11-16 20:37 ` Arend van Spriel

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®