diff options
Diffstat (limited to 'src/drivers/net/pnic.c')
-rw-r--r-- | src/drivers/net/pnic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c index 09ac92a4..c74e7b50 100644 --- a/src/drivers/net/pnic.c +++ b/src/drivers/net/pnic.c @@ -112,14 +112,14 @@ static int pnic_api_check ( uint16_t api_version ) { /************************************************************************** POLL - Wait for a frame ***************************************************************************/ -static void pnic_poll ( struct net_device *netdev ) { +static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) { struct pnic *pnic = netdev->priv; struct pk_buff *pkb; uint16_t length; uint16_t qlen; /* Fetch all available packets */ - while ( 1 ) { + while ( rx_quota ) { if ( pnic_command ( pnic, PNIC_CMD_RECV_QLEN, NULL, 0, &qlen, sizeof ( qlen ), NULL ) != PNIC_STATUS_OK ) @@ -139,6 +139,7 @@ static void pnic_poll ( struct net_device *netdev ) { } pkb_put ( pkb, length ); netdev_rx ( netdev, pkb ); + --rx_quota; } } |