be2net: fix netdev_stats_update
authorSathya Perla <sathya.perla@emulex.com>
Sun, 26 Jun 2011 20:40:48 +0000 (20:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jun 2011 07:09:31 +0000 (00:09 -0700)
commit6e53391cb4f9491182e7fbd280966ebe2aca07dc
treed2e920a3b86e8d58903e051c98071da646eabb1e
parentc6af9c406ceb3434281cf230938453931dcbab75
be2net: fix netdev_stats_update

Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>

netdev_stats_update() resets netdev->stats and then accumulates stats from
various rings. This is wrong as stats readers can sometimes catch zero values.
Use temporary variables instead for accumulating per-ring values.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_main.c