From ff9116262e8d0c947a60e684ee6789165317820b Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Mon, 8 Jan 2018 17:53:08 +0000 Subject: 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. --- sys/dev/pci/if_bwfm_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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 @@ -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); -- cgit v1.2.3