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

@@ -128,13 +128,14 @@ static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) {
break;
iobuf = alloc_iob ( ETH_FRAME_LEN );
if ( ! iobuf ) {
printf ( "could not allocate buffer\n" );
DBG ( "could not allocate buffer\n" );
netdev_rx_err ( netdev, NULL, -ENOMEM );
break;
}
if ( pnic_command ( pnic, PNIC_CMD_RECV, NULL, 0,
iobuf->data, ETH_FRAME_LEN, &length )
!= PNIC_STATUS_OK ) {
free_iob ( iobuf );
netdev_rx_err ( netdev, iobuf, -EIO );
break;
}
iob_put ( iobuf, length );