From: patrick Date: Fri, 26 Feb 2021 11:22:10 +0000 (+0000) Subject: Increase the amount of RX buffers given to the bwfm(4) chip. We haave seen X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ef2dd0fe498e8efc12c384a8aa890f3302940e1;p=openbsd 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. --- 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);