-/* $OpenBSD: if_bwfm_pci.c,v 1.40 2021/02/25 02:48:20 dlg Exp $ */
+/* $OpenBSD: if_bwfm_pci.c,v 1.41 2021/02/25 23:26:05 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
d2h_w_idx_ptr, d2h_r_idx_ptr, 0, idx_offset,
&ring_mem_ptr))
goto cleanup;
- if (bwfm_pci_setup_ring(sc, &sc->sc_tx_complete, 1024, 16,
+ if (bwfm_pci_setup_ring(sc, &sc->sc_tx_complete, 1024,
+ sc->sc_shared_version >= 7 ? 24 : 16,
d2h_w_idx_ptr, d2h_r_idx_ptr, 1, idx_offset,
&ring_mem_ptr))
goto cleanup;
- if (bwfm_pci_setup_ring(sc, &sc->sc_rx_complete, 512, 32,
+ if (bwfm_pci_setup_ring(sc, &sc->sc_rx_complete, 512,
+ sc->sc_shared_version >= 7 ? 40 : 32,
d2h_w_idx_ptr, d2h_r_idx_ptr, 2, idx_offset,
&ring_mem_ptr))
goto cleanup;
-/* $OpenBSD: if_bwfm_pci.h,v 1.2 2018/01/05 23:30:16 patrick Exp $ */
+/* $OpenBSD: if_bwfm_pci.h,v 1.3 2021/02/25 23:26:05 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
#define BWFM_SHARED_INFO 0x000
#define BWFM_SHARED_INFO_MIN_VERSION 5
-#define BWFM_SHARED_INFO_MAX_VERSION 6
+#define BWFM_SHARED_INFO_MAX_VERSION 7
#define BWFM_SHARED_INFO_VERSION_MASK 0x00FF
#define BWFM_SHARED_INFO_DMA_INDEX 0x10000
#define BWFM_SHARED_INFO_DMA_2B_IDX 0x100000