summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2020-06-11 08:30:03 +0000
committerstsp <stsp@openbsd.org>2020-06-11 08:30:03 +0000
commit0c85d057a6aa75e5959b551236884fb174a3d276 (patch)
treef7e65460dd31ec91399a2050d43dc559d9f323f3
parentIncrease iwx(4) command queue size. Otherwise the firmware sends duplicate (diff)
downloadwireguard-openbsd-0c85d057a6aa75e5959b551236884fb174a3d276.tar.xz
wireguard-openbsd-0c85d057a6aa75e5959b551236884fb174a3d276.zip
Make iwx(4) update the Tx ring byte count table.
With iwn(4) and iwm(4) this was only required for Tx aggregation, which we don't use yet in iwx(4). But it looks like iwx(4) firmware will run into fatal errors if we neglect to update this table. The Linux iwlwifi driver always updates this table so firmware could be relying on it. Tested by jcs@, sven falempin, and myself.
-rw-r--r--sys/dev/pci/if_iwx.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index 05c737abbc6..b1a373951ee 100644
--- a/sys/dev/pci/if_iwx.c
+++ b/sys/dev/pci/if_iwx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwx.c,v 1.24 2020/06/11 08:19:17 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.25 2020/06/11 08:30:03 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -4333,10 +4333,6 @@ iwx_tx_fill_cmd(struct iwx_softc *sc, struct iwx_node *in,
return rinfo;
}
-#if 0
-/*
- * necessary only for block ack mode
- */
void
iwx_tx_update_byte_tbl(struct iwx_tx_ring *txq, uint16_t byte_cnt,
uint16_t num_tbs)
@@ -4363,7 +4359,6 @@ iwx_tx_update_byte_tbl(struct iwx_tx_ring *txq, uint16_t byte_cnt,
bc_ent = htole16(len | (num_fetch_chunks << 12));
scd_bc_tbl->tfd_offset[txq->cur] = bc_ent;
}
-#endif
int
iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac)
@@ -4531,9 +4526,7 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac)
(char *)(void *)desc - (char *)(void *)ring->desc_dma.vaddr,
sizeof (*desc), BUS_DMASYNC_PREWRITE);
-#if 0
iwx_tx_update_byte_tbl(ring, totlen, num_tbs);
-#endif
/* Kick TX ring. */
ring->cur = (ring->cur + 1) % IWX_TX_RING_COUNT;