summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2018-01-08 17:53:08 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2018-01-08 17:53:08 +0000
commitff9116262e8d0c947a60e684ee6789165317820b (patch)
treeb9262adbd87e6e1c4e4cb5917a0c571d199ef0ed /sys
parentf63f8d162753afd4b53e83a051d11b6b238d0c51 (diff)
The bwfm(4) TX ring expects the ethernet header as part of the TX info
struct. The data length is the length of the frame without the header. In the previous version m_adj(9) is used, but since that was changed we need to decrease the length ourselves.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bwfm_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c
index c22098c9a73..ebbf44e3994 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.9 2018/01/08 17:29:21 patrick Exp $ */
+/* $OpenBSD: if_bwfm_pci.c,v 1.10 2018/01/08 17:53:07 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
@@ -1661,7 +1661,7 @@ bwfm_pci_txdata(struct bwfm_softc *bwfm, struct mbuf *m)
paddr += ETHER_HDR_LEN;
tx->msg.request_id = htole32(pktid);
- tx->data_len = m->m_len;
+ tx->data_len = htole16(m->m_len - ETHER_HDR_LEN);
tx->data_buf_addr.high_addr = htole32(paddr >> 32);
tx->data_buf_addr.low_addr = htole32(paddr & 0xffffffff);