summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sis.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-10-12 21:14:38 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-10-12 21:14:38 +0000
commit3447232df109443dc6685d4b0c628c5c3d9a34b9 (patch)
tree3c4de89ead51d9ed49c23fb134ad6ceadc16ca34 /sys/dev/pci/if_sis.c
parentda118f9f7685dc00a8337613f6e7e63cbbb57e0a (diff)
have sis strip off the Ethernet FCS before passing it to bpf.
ok fgsch@
Diffstat (limited to 'sys/dev/pci/if_sis.c')
-rw-r--r--sys/dev/pci/if_sis.c10
1 files 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 <wpaul@ctr.columbia.edu>. 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