Use netdev_rx_err() to report receive errors.

This commit is contained in:
Michael Brown
2007-07-05 17:23:03 +01:00
parent 539ff45fd0
commit ed7eae6005
2 changed files with 5 additions and 2 deletions

View File

@@ -444,6 +444,7 @@ static void rtl_poll ( struct net_device *netdev, unsigned int rx_quota ) {
rx_iob = alloc_iob ( rx_len );
if ( ! rx_iob ) {
netdev_rx_err ( netdev, NULL, -ENOMEM );
/* Leave packet for next call to poll() */
break;
}
@@ -464,6 +465,7 @@ static void rtl_poll ( struct net_device *netdev, unsigned int rx_quota ) {
} else {
DBG ( "RX bad packet (status %#04x len %d)\n",
rx_status, rx_len );
netdev_rx_err ( netdev, NULL, -EINVAL );
}
rtl->rx.offset = ( ( ( rtl->rx.offset + 4 + rx_len + 3 ) & ~3 )
% RX_BUF_LEN );