Do better reporting of transmit errors.

This commit is contained in:
scottr 1997-12-26 22:37:05 +00:00
parent cdaaa46a87
commit 89b10b928f
1 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.1 1997/02/04 03:52:28 thorpej Exp $ */
/* $NetBSD: if_le.c,v 1.2 1997/12/26 22:37:05 scottr Exp $ */
/*
* Copyright (c) 1993 Adam Glass
@ -607,10 +607,16 @@ le_put(desc, pkt, len)
if (cdm->flags & LE_ONE)
le_stats[unit].collisions++;
if (cdm->flags & LE_MORE)
le_stats[unit].collisions+=2;
le_stats[unit].collisions += 2;
if (cdm->flags & LE_ERR) {
printf("le%d: transmit error, error = 0x%x\n", unit,
cdm->mcnt);
if (cdm->mcnt & LE_UFLO)
printf("le%d: transmit underflow\n", unit);
if (cdm->mcnt & LE_LCOL)
le_stats[unit].collisions++;
if (cdm->mcnt & LE_LCAR)
printf("le%d: lost carrier\n", unit);
if (cdm->mcnt & LE_RTRY)
le_stats[unit].collisions += 16;
return -1;
}
#ifdef LE_DEBUG