summaryrefslogtreecommitdiff
path: root/drivers/net/atl1e/atl1e_main.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-05-26 06:48:43 (GMT)
committerDavid S. Miller <davem@davemloft.net>2009-05-26 06:48:43 (GMT)
commitd3f65f7c3cf11b036bbc01f22ac5c958570e724c (patch)
tree497eaf85949b0ae1fe8a38094c320c0b66b569a9 /drivers/net/atl1e/atl1e_main.c
parent08baf561083bc27a953aa087dd8a664bb2b88e8e (diff)
downloadlinux-d3f65f7c3cf11b036bbc01f22ac5c958570e724c.tar.xz
atl1: use netdev->stats
Get rid of private struct net_device_stats in "struct atl1e_adapter", and use one provided in struct net_device instead. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1e/atl1e_main.c')
-rw-r--r--drivers/net/atl1e/atl1e_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index adac061..c271b75 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -1153,7 +1153,7 @@ static struct net_device_stats *atl1e_get_stats(struct net_device *netdev)
{
struct atl1e_adapter *adapter = netdev_priv(netdev);
struct atl1e_hw_stats *hw_stats = &adapter->hw_stats;
- struct net_device_stats *net_stats = &adapter->net_stats;
+ struct net_device_stats *net_stats = &netdev->stats;
net_stats->rx_packets = hw_stats->rx_ok;
net_stats->tx_packets = hw_stats->tx_ok;
@@ -1181,7 +1181,7 @@ static struct net_device_stats *atl1e_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 void atl1e_update_hw_stats(struct atl1e_adapter *adapter)
@@ -1309,7 +1309,7 @@ static irqreturn_t atl1e_intr(int irq, void *data)
/* link event */
if (status & (ISR_GPHY | ISR_MANUAL)) {
- adapter->net_stats.tx_carrier_errors++;
+ netdev->stats.tx_carrier_errors++;
atl1e_link_chg_event(adapter);
break;
}