diff --git a/sys/dev/i2o/iopl.c b/sys/dev/i2o/iopl.c index 4d33b1d5c87e..e927ad8cc3b6 100644 --- a/sys/dev/i2o/iopl.c +++ b/sys/dev/i2o/iopl.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopl.c,v 1.14 2004/10/30 18:08:35 thorpej Exp $ */ +/* $NetBSD: iopl.c,v 1.15 2005/01/31 02:51:17 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.14 2004/10/30 18:08:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.15 2005/01/31 02:51:17 thorpej Exp $"); #include "opt_i2o.h" #include "opt_inet.h" @@ -1081,13 +1081,13 @@ iopl_intr_rx(struct device *dv, struct iop_msg *im, void *reply) } /* - * Otherwise, fix up the header, feed a copy to BPF, and - * then pass it on up. + * Otherwise, fix up the header, trim off the CRC, feed + * a copy to BPF, and then pass it on up. */ - m->m_flags |= M_HASFCS; m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = len; m->m_pkthdr.csum_flags = csumflgs[pkt] | sc->sc_rx_csumflgs; + m_adj(m, -ETHER_CRC_LEN); #if NBPFILTER > 0 if (ifp->if_bpf) diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 8c57b80f6a8c..0440f35cadc9 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.32 2004/10/30 18:08:36 thorpej Exp $ */ +/* $NetBSD: gem.c,v 1.33 2005/01/31 02:53:19 thorpej Exp $ */ /* * @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.32 2004/10/30 18:08:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.33 2005/01/31 02:53:19 thorpej Exp $"); #include "bpfilter.h" @@ -1406,7 +1406,7 @@ gem_rint(sc) * No errors; receive the packet. Note the Gem * includes the CRC with every packet. */ - len = GEM_RD_BUFLEN(rxstat); + len = GEM_RD_BUFLEN(rxstat) - ETHER_CRC_LEN; /* * Allocate a new mbuf cluster. If that fails, we are @@ -1425,7 +1425,6 @@ gem_rint(sc) m->m_data += 2; /* We're already off by two */ eh = mtod(m, struct ether_header *); - m->m_flags |= M_HASFCS; m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = len; diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 04665bc05419..e79e8376d380 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtw.c,v 1.42 2005/01/16 11:50:43 dyoung Exp $ */ +/* $NetBSD: rtw.c,v 1.43 2005/01/31 02:56:49 thorpej Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. * @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.42 2005/01/16 11:50:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.43 2005/01/31 02:56:49 thorpej Exp $"); #include "bpfilter.h" @@ -1343,6 +1343,9 @@ rtw_intr_rx(struct rtw_softc *sc, uint16_t isr) goto next; } + /* CRC is included with the packet; trim it off. */ + len -= IEEE80211_CRC_LEN; + hwrate = MASK_AND_RSHIFT(hstat, RTW_RXSTAT_RATE_MASK); if (hwrate >= sizeof(ratetbl) / sizeof(ratetbl[0])) { printf("%s: unknown rate #%d\n", sc->sc_dev.dv_xname, @@ -1425,7 +1428,6 @@ rtw_intr_rx(struct rtw_softc *sc, uint16_t isr) */ m->m_pkthdr.rcvif = &sc->sc_if; m->m_pkthdr.len = m->m_len = len; - m->m_flags |= M_HASFCS; wh = mtod(m, struct ieee80211_frame *);