tc35815: Fix rx_missed_errors count
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Thu, 6 Aug 2009 04:41:48 +0000 (04:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Aug 2009 20:14:24 +0000 (13:14 -0700)
The Miss_Cnt register is cleared by reading.  Accumulate its value to
rx_missed_errors count.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tc35815.c

index f42aaf72cc955adbf6d0ea83988fd8b9a863fe57..411cc0e5f7a41a55dde22b44f5dde1019d6f4d51 100644 (file)
@@ -2139,7 +2139,7 @@ static struct net_device_stats *tc35815_get_stats(struct net_device *dev)
                (struct tc35815_regs __iomem *)dev->base_addr;
        if (netif_running(dev))
                /* Update the statistics from the device registers. */
-               dev->stats.rx_missed_errors = tc_readl(&tr->Miss_Cnt);
+               dev->stats.rx_missed_errors += tc_readl(&tr->Miss_Cnt);
 
        return &dev->stats;
 }