tg3: fix return value in tg3_get_stats64
authorGovindarajulu Varadarajan <_govind@gmx.com>
Wed, 13 Aug 2014 07:34:56 +0000 (13:04 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Aug 2014 03:04:47 +0000 (20:04 -0700)
commit7b31b4deda7679120379c005df8d3d647161eff7
tree8596d1e8d49180a1e68eac5749e21768626a65e2
parent1d311ad2f9fe5d75cf228372174170d0f435e3ef
tg3: fix return value in tg3_get_stats64

When tp->hw_stats is 0, tg3_get_stats64 should display previously
recorded stats. So it returns &tp->net_stats_prev. But the caller,
dev_get_stats, ignores the return value.

Fix this by assigning tp->net_stats_prev to stats and returning stats.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Acked-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c