diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/forcedeth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index dae30b731342..2e708150b014 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2268,13 +2268,13 @@ static int nv_rx_process(struct net_device *dev, int limit) | |||
2268 | { | 2268 | { |
2269 | struct fe_priv *np = netdev_priv(dev); | 2269 | struct fe_priv *np = netdev_priv(dev); |
2270 | u32 flags; | 2270 | u32 flags; |
2271 | u32 rx_processed_cnt = 0; | 2271 | int rx_work = 0; |
2272 | struct sk_buff *skb; | 2272 | struct sk_buff *skb; |
2273 | int len; | 2273 | int len; |
2274 | 2274 | ||
2275 | while((np->get_rx.orig != np->put_rx.orig) && | 2275 | while((np->get_rx.orig != np->put_rx.orig) && |
2276 | !((flags = le32_to_cpu(np->get_rx.orig->flaglen)) & NV_RX_AVAIL) && | 2276 | !((flags = le32_to_cpu(np->get_rx.orig->flaglen)) & NV_RX_AVAIL) && |
2277 | (rx_processed_cnt++ < limit)) { | 2277 | (rx_work < limit)) { |
2278 | 2278 | ||
2279 | dprintk(KERN_DEBUG "%s: nv_rx_process: flags 0x%x.\n", | 2279 | dprintk(KERN_DEBUG "%s: nv_rx_process: flags 0x%x.\n", |
2280 | dev->name, flags); | 2280 | dev->name, flags); |
@@ -2396,9 +2396,11 @@ next_pkt: | |||
2396 | np->get_rx.orig = np->first_rx.orig; | 2396 | np->get_rx.orig = np->first_rx.orig; |
2397 | if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx)) | 2397 | if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx)) |
2398 | np->get_rx_ctx = np->first_rx_ctx; | 2398 | np->get_rx_ctx = np->first_rx_ctx; |
2399 | |||
2400 | rx_work++; | ||
2399 | } | 2401 | } |
2400 | 2402 | ||
2401 | return rx_processed_cnt; | 2403 | return rx_work; |
2402 | } | 2404 | } |
2403 | 2405 | ||
2404 | static int nv_rx_process_optimized(struct net_device *dev, int limit) | 2406 | static int nv_rx_process_optimized(struct net_device *dev, int limit) |