From 4ef2dd0fe498e8efc12c384a8aa890f3302940e1 Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 26 Feb 2021 11:22:10 +0000 Subject: [PATCH] Increase the amount of RX buffers given to the bwfm(4) chip. We haave seen this already on previous chips, which only started giving us packets when handing over at least 128 of them. Apparently some now require 256, which seems to get the Apple M1's WiFi going. --- sys/dev/pci/if_bwfm_pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c index 258e0d14f2d..27d53b352b2 100644 --- a/sys/dev/pci/if_bwfm_pci.c +++ b/sys/dev/pci/if_bwfm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_pci.c,v 1.47 2021/02/26 00:19:41 patrick Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.48 2021/02/26 11:22:10 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt @@ -676,10 +676,10 @@ bwfm_pci_preinit(struct bwfm_softc *bwfm) /* * For whatever reason, could also be a bug somewhere in this * driver, the firmware needs a bunch of RX buffers otherwise - * it won't send any RX complete messages. 64 buffers don't - * suffice, but 128 buffers are enough. + * it won't send any RX complete messages. */ - if_rxr_init(&sc->sc_rxbuf_ring, 128, sc->sc_max_rxbufpost); + if_rxr_init(&sc->sc_rxbuf_ring, min(256, sc->sc_max_rxbufpost), + sc->sc_max_rxbufpost); if_rxr_init(&sc->sc_ioctl_ring, 8, 8); if_rxr_init(&sc->sc_event_ring, 8, 8); bwfm_pci_fill_rx_rings(sc); -- 2.20.1