From d482d37e815f8b4b4ddeaba63e49713bec1cd2d3 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Thu, 24 Dec 1998 18:03:17 +0000 Subject: The VIA Rhine appears to be yet another chip that always includes the ethernet CRC in received frames and has no option to turn this behavior off. Trim the CRC off manually in vr_rxeof(). --- sys/dev/vr/if_vr.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sys/dev/vr') diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 07890f8481021..608d43b1d8315 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.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_vr.c,v 1.3 1998/12/07 21:58:47 archie Exp $ + * $Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $ */ /* @@ -97,7 +97,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_vr.c,v 1.3 1998/12/07 21:58:47 archie Exp $"; + "$Id: if_vr.c,v 1.4 1998/12/14 06:32:56 dillon Exp $"; #endif /* @@ -1285,6 +1285,15 @@ static void vr_rxeof(sc) m = cur_rx->vr_mbuf; total_len = VR_RXBYTES(cur_rx->vr_ptr->vr_status); + /* + * XXX The VIA Rhine 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 -- cgit v1.3