summaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1c/atl1c_main.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-08-20 02:55:16 +0000
committerDavid S. Miller <davem@davemloft.net>2010-08-21 23:09:36 -0700
commita2c483a19a96cf5cb9465f42cca34548b9211954 (patch)
tree0cbaee12e9d4e354bac5aa3d92e0cada82271f4e /drivers/net/atl1c/atl1c_main.c
parent00959ade36acadc00e757f87060bf6e4501d545f (diff)
downloadop-kernel-dev-a2c483a19a96cf5cb9465f42cca34548b9211954.zip
op-kernel-dev-a2c483a19a96cf5cb9465f42cca34548b9211954.tar.gz
atl1c: use net_device_stats from struct net_device
struct net_device has its own struct net_device_stats member, so use this one instead of a private copy in the atl1c_adapter struct. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1c/atl1c_main.c')
-rw-r--r--drivers/net/atl1c/atl1c_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index c7b8ef5..61f1634 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -1562,7 +1562,7 @@ static struct net_device_stats *atl1c_get_stats(struct net_device *netdev)
{
struct atl1c_adapter *adapter = netdev_priv(netdev);
struct atl1c_hw_stats *hw_stats = &adapter->hw_stats;
- struct net_device_stats *net_stats = &adapter->net_stats;
+ struct net_device_stats *net_stats = &netdev->stats;
atl1c_update_hw_stats(adapter);
net_stats->rx_packets = hw_stats->rx_ok;
@@ -1590,7 +1590,7 @@ static struct net_device_stats *atl1c_get_stats(struct net_device *netdev)
net_stats->tx_aborted_errors = hw_stats->tx_abort_col;
net_stats->tx_window_errors = hw_stats->tx_late_col;
- return &adapter->net_stats;
+ return net_stats;
}
static inline void atl1c_clear_phy_int(struct atl1c_adapter *adapter)
@@ -1700,7 +1700,7 @@ static irqreturn_t atl1c_intr(int irq, void *data)
/* link event */
if (status & (ISR_GPHY | ISR_MANUAL)) {
- adapter->net_stats.tx_carrier_errors++;
+ netdev->stats.tx_carrier_errors++;
atl1c_link_chg_event(adapter);
break;
}
OpenPOWER on IntegriCloud