From: patrick Date: Mon, 8 Jan 2018 17:53:07 +0000 (+0000) Subject: The bwfm(4) TX ring expects the ethernet header as part of the TX info X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ff787bc57a385c0c3d2f5185c81cd2d5cbcbd14;p=openbsd 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. --- 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);