diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-05-26 02:48:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-26 02:48:43 -0400 |
commit | d3f65f7c3cf11b036bbc01f22ac5c958570e724c (patch) | |
tree | 497eaf85949b0ae1fe8a38094c320c0b66b569a9 | |
parent | 08baf561083bc27a953aa087dd8a664bb2b88e8e (diff) |
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>
-rw-r--r-- | drivers/net/atl1e/atl1e.h | 1 | ||||
-rw-r--r-- | drivers/net/atl1e/atl1e_main.c | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/atl1e/atl1e.h b/drivers/net/atl1e/atl1e.h index 2bf63b4368e2..ba48220df16a 100644 --- a/drivers/net/atl1e/atl1e.h +++ b/drivers/net/atl1e/atl1e.h | |||
@@ -429,7 +429,6 @@ struct atl1e_adapter { | |||
429 | struct mii_if_info mii; /* MII interface info */ | 429 | struct mii_if_info mii; /* MII interface info */ |
430 | struct atl1e_hw hw; | 430 | struct atl1e_hw hw; |
431 | struct atl1e_hw_stats hw_stats; | 431 | struct atl1e_hw_stats hw_stats; |
432 | struct net_device_stats net_stats; | ||
433 | 432 | ||
434 | bool have_msi; | 433 | bool have_msi; |
435 | u32 wol; | 434 | u32 wol; |
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c index adac06195c8f..c271b7537fab 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) | |||
1153 | { | 1153 | { |
1154 | struct atl1e_adapter *adapter = netdev_priv(netdev); | 1154 | struct atl1e_adapter *adapter = netdev_priv(netdev); |
1155 | struct atl1e_hw_stats *hw_stats = &adapter->hw_stats; | 1155 | struct atl1e_hw_stats *hw_stats = &adapter->hw_stats; |
1156 | struct net_device_stats *net_stats = &adapter->net_stats; | 1156 | struct net_device_stats *net_stats = &netdev->stats; |
1157 | 1157 | ||
1158 | net_stats->rx_packets = hw_stats->rx_ok; | 1158 | net_stats->rx_packets = hw_stats->rx_ok; |
1159 | net_stats->tx_packets = hw_stats->tx_ok; | 1159 | net_stats->tx_packets = hw_stats->tx_ok; |
@@ -1181,7 +1181,7 @@ static struct net_device_stats *atl1e_get_stats(struct net_device *netdev) | |||
1181 | net_stats->tx_aborted_errors = hw_stats->tx_abort_col; | 1181 | net_stats->tx_aborted_errors = hw_stats->tx_abort_col; |
1182 | net_stats->tx_window_errors = hw_stats->tx_late_col; | 1182 | net_stats->tx_window_errors = hw_stats->tx_late_col; |
1183 | 1183 | ||
1184 | return &adapter->net_stats; | 1184 | return net_stats; |
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | static void atl1e_update_hw_stats(struct atl1e_adapter *adapter) | 1187 | static void atl1e_update_hw_stats(struct atl1e_adapter *adapter) |
@@ -1309,7 +1309,7 @@ static irqreturn_t atl1e_intr(int irq, void *data) | |||
1309 | 1309 | ||
1310 | /* link event */ | 1310 | /* link event */ |
1311 | if (status & (ISR_GPHY | ISR_MANUAL)) { | 1311 | if (status & (ISR_GPHY | ISR_MANUAL)) { |
1312 | adapter->net_stats.tx_carrier_errors++; | 1312 | netdev->stats.tx_carrier_errors++; |
1313 | atl1e_link_chg_event(adapter); | 1313 | atl1e_link_chg_event(adapter); |
1314 | break; | 1314 | break; |
1315 | } | 1315 | } |