tg3: Fix stats while interface is down
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 13 Feb 2012 15:20:09 +0000 (15:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Feb 2012 01:45:04 +0000 (20:45 -0500)
commitb546e46f5c9f19a921d6f62db80f2e9371bc0558
tree363edfa3698ed62ec6e9028d760ff9f7282b3f9f
parent3906969189a409e590a51b18c86a92d0506c9372
tg3: Fix stats while interface is down

If the tg3 interface is down, the driver will return ethtool stats
uninitialized.  This patch zeroes out the destination stat buffer in
such a case.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c