Skip to content
Commit 816f8b86 authored by Stefan Buehler's avatar Stefan Buehler Committed by David S. Miller
Browse files

tg3: fix 64 bit counter for ethtool stats



Ethtool stats are 64-bits in length.  net_device_stats members are
unsigned long types.  When gathering information for
a get_ethtool_stats call, the driver will call a driver-private,
inlined get_stat64() function, which returns an unsigned long value.
This call will inadvertently mask off the upper 32-bits of a stat on
32-bit machines.

This patch defines a new get_estat() inline function and modifies the
ESTAT_ADD() macro to use it.

Signed-off-by: default avatarStefan Buehler <stbuehler@web.de>
Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ba526ce
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment