summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2020-06-11 08:30:04 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2020-06-11 08:30:04 +0000
commitbf15af56f943081b4f6cf66a60f8f0fef2fab337 (patch)
treec2a1b5b5b257a6d55eb261163c8e772429b0798d /sys/dev/pci
parent98afadd9da92aaa2b1733058e0c771d27b5d81c4 (diff)
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.
Diffstat (limited to 'sys/dev/pci')
-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;