[PATCH] 3c59x: correct rx_dropped counting
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Nov 2005 08:58:08 +0000 (00:58 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:25 +0000 (07:53 -0800)
Only increment rx_dropped in case of lack of resources (i.e. not for
frames with errors).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/net/3c59x.c

index be4f962d27b0f8ec305cc8d989f6c25f91d47725..413b82c5994cd94d9cf8356d0bce812511faab97 100644 (file)
@@ -2608,8 +2608,8 @@ static int vortex_rx(struct net_device *dev)
                        } else if (vortex_debug > 0)
                                printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of "
                                           "size %d.\n", dev->name, pkt_len);
+                       vp->stats.rx_dropped++;
                }
-               vp->stats.rx_dropped++;
                issue_and_wait(dev, RxDiscard);
        }