From 3447232df109443dc6685d4b0c628c5c3d9a34b9 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 12 Oct 2005 21:14:38 +0000 Subject: have sis strip off the Ethernet FCS before passing it to bpf. ok fgsch@ --- sys/dev/pci/if_sis.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 9fa6c05b0c2..2bb43878c30 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.51 2005/08/09 04:10:12 mickey Exp $ */ +/* $OpenBSD: if_sis.c,v 1.52 2005/10/12 21:14:37 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -1307,7 +1307,6 @@ void sis_rxeof(sc) total_len = SIS_RXBYTES(cur_rx); SIS_INC(i, sc->sc_rxbufs); - /* * If an error occurs, update stats, clear the * status word and leave the mbuf cluster in place: @@ -1322,7 +1321,12 @@ void sis_rxeof(sc) continue; } - /* No errors; receive the packet. */ + /* + * No errors; receive the packet. Note, the chip + * includes the CRC with every packet. + */ + total_len -= ETHER_CRC_LEN; + bus_dmamap_sync(sc->sc_dmat, cur_rx->map, 0, cur_rx->map->dm_mapsize, BUS_DMASYNC_POSTREAD); #ifndef __STRICT_ALIGNMENT -- cgit v1.2.3