summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-05-19 18:24:09 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-05-19 18:24:09 +0000
commitf88c6b8ac1e6303ef8f8a3f4b258168f8bbd7d81 (patch)
treea02eaeaad8c8949a7a90d25cd2bc25c477687783 /sys
parentb041683495b1a7125fc400234f0d6485d6d69298 (diff)
simplify finalization of mbuf in wpi_rx_intr()
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_wpi.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index 13998c0221d..41303e311b4 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.4 2006/05/19 18:14:35 damien Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.5 2006/05/19 18:24:08 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -1087,16 +1087,8 @@ wpi_rx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc,
/* finalize mbuf */
m->m_pkthdr.rcvif = ifp;
- m->m_pkthdr.len = m->m_len =
- sizeof (struct wpi_rx_desc) +
- sizeof (struct wpi_rx_stat) + stat->len +
- sizeof (struct wpi_rx_head) + letoh16(head->len) +
- sizeof (struct wpi_rx_tail);
-
- /* remove head + tail */
- m_adj(m, sizeof (struct wpi_rx_desc) + sizeof (struct wpi_rx_stat) +
- stat->len + sizeof (struct wpi_rx_head));
- m_adj(m, -sizeof (struct wpi_rx_tail));
+ m->m_data = (caddr_t)(head + 1);
+ m->m_pkthdr.len = m->m_len = letoh16(head->len);
#if NBPFILTER > 0
if (sc->sc_drvbpf != NULL) {