diff options
author | 2020-01-15 21:41:02 +0000 | |
---|---|---|
committer | 2020-01-15 21:41:02 +0000 | |
commit | f9ee104fbd1cc9b2157fddb6ee10ff641200c7f7 (patch) | |
tree | fc77bf1d08ebe651abf4c574d4d031da2c4063cf | |
parent | Do not create files as dependency of .BEGIN rule. Noticed by (diff) | |
download | wireguard-openbsd-f9ee104fbd1cc9b2157fddb6ee10ff641200c7f7.tar.xz wireguard-openbsd-f9ee104fbd1cc9b2157fddb6ee10ff641200c7f7.zip |
Some PCIe firmwares drop TX packets when the pktid is 0. Add
an offset to make sure they start from 1.
-rw-r--r-- | sys/dev/pci/if_bwfm_pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c index ba9652b8a42..d9aaceac3e3 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.31 2020/01/15 20:17:08 patrick Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.32 2020/01/15 21:41:02 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> @@ -1380,7 +1380,7 @@ bwfm_pci_msg_rx(struct bwfm_pci_softc *sc, void *buf) case MSGBUF_TYPE_TX_STATUS: tx = (struct msgbuf_tx_status *)buf; m = bwfm_pci_pktid_free(sc, &sc->sc_tx_pkts, - letoh32(tx->msg.request_id)); + letoh32(tx->msg.request_id) - 1); if (m == NULL) break; m_freem(m); @@ -1837,7 +1837,7 @@ bwfm_pci_txdata(struct bwfm_softc *bwfm, struct mbuf *m) } paddr += ETHER_HDR_LEN; - tx->msg.request_id = htole32(pktid); + tx->msg.request_id = htole32(pktid + 1); tx->data_len = htole16(m->m_len - ETHER_HDR_LEN); tx->data_buf_addr.high_addr = htole32((uint64_t)paddr >> 32); tx->data_buf_addr.low_addr = htole32(paddr & 0xffffffff); |