From 6a5ae683b942400b8705c879d51fbefc9edc796a Mon Sep 17 00:00:00 2001 From: wpaul Date: Sat, 19 Dec 1998 04:19:44 +0000 Subject: Trim the ethernet CRC from received frames manually in wb_rxeof(). The Winbond chip always includes the CRC with every received frame, and I can't find anything in the Winbond manual that indicates you can program it not to do this. --- sys/pci/if_wb.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sys/pci/if_wb.c') diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index 1fa7b9a..3e3e634 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_wb.c,v 1.3 1998/12/10 02:02:30 archie Exp $ + * $Id: if_wb.c,v 1.4 1998/12/14 06:32:56 dillon Exp $ */ /* @@ -121,7 +121,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_wb.c,v 1.3 1998/12/10 02:02:30 archie Exp $"; + "$Id: if_wb.c,v 1.4 1998/12/14 06:32:56 dillon Exp $"; #endif /* @@ -1375,6 +1375,15 @@ static void wb_rxeof(sc) total_len = WB_RXBYTES(cur_rx->wb_ptr->wb_status); /* + * XXX The Winbond chip includes the CRC with every + * received frame, and there's no way to turn this + * behavior off (at least, I can't find anything in + * the manual that explains how to do it) so we have + * to trim off the CRC manually. + */ + total_len -= ETHER_CRC_LEN; + + /* * Try to conjure up a new mbuf cluster. If that * fails, it means we have an out of memory condition and * should leave the buffer in place and continue. This will -- cgit v1.1