aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/mv643xx_eth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index fb6b232069d6..ab74d4583c41 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -412,15 +412,13 @@ static int mv643xx_eth_receive_queue(struct net_device *dev)
412 struct pkt_info pkt_info; 412 struct pkt_info pkt_info;
413 413
414#ifdef MV643XX_NAPI 414#ifdef MV643XX_NAPI
415 while (eth_port_receive(mp, &pkt_info) == ETH_OK && budget > 0) { 415 while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
416#else 416#else
417 while (eth_port_receive(mp, &pkt_info) == ETH_OK) { 417 while (eth_port_receive(mp, &pkt_info) == ETH_OK) {
418#endif 418#endif
419 mp->rx_ring_skbs--; 419 mp->rx_ring_skbs--;
420 received_packets++; 420 received_packets++;
421#ifdef MV643XX_NAPI 421
422 budget--;
423#endif
424 /* Update statistics. Note byte count includes 4 byte CRC count */ 422 /* Update statistics. Note byte count includes 4 byte CRC count */
425 stats->rx_packets++; 423 stats->rx_packets++;
426 stats->rx_bytes += pkt_info.byte_cnt; 424 stats->rx_bytes += pkt_info.byte_cnt;