diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-08-19 22:55:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-22 02:09:36 -0400 |
commit | a2c483a19a96cf5cb9465f42cca34548b9211954 (patch) | |
tree | 0cbaee12e9d4e354bac5aa3d92e0cada82271f4e | |
parent | 00959ade36acadc00e757f87060bf6e4501d545f (diff) |
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>
-rw-r--r-- | drivers/net/atl1c/atl1c.h | 1 | ||||
-rw-r--r-- | drivers/net/atl1c/atl1c_main.c | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h index 52abbbdf8a08..ef4115b897bf 100644 --- a/drivers/net/atl1c/atl1c.h +++ b/drivers/net/atl1c/atl1c.h | |||
@@ -559,7 +559,6 @@ struct atl1c_adapter { | |||
559 | struct napi_struct napi; | 559 | struct napi_struct napi; |
560 | struct atl1c_hw hw; | 560 | struct atl1c_hw hw; |
561 | struct atl1c_hw_stats hw_stats; | 561 | struct atl1c_hw_stats hw_stats; |
562 | struct net_device_stats net_stats; | ||
563 | struct mii_if_info mii; /* MII interface info */ | 562 | struct mii_if_info mii; /* MII interface info */ |
564 | u16 rx_buffer_len; | 563 | u16 rx_buffer_len; |
565 | 564 | ||
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c index c7b8ef507ebd..61f1634ab3f8 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) | |||
1562 | { | 1562 | { |
1563 | struct atl1c_adapter *adapter = netdev_priv(netdev); | 1563 | struct atl1c_adapter *adapter = netdev_priv(netdev); |
1564 | struct atl1c_hw_stats *hw_stats = &adapter->hw_stats; | 1564 | struct atl1c_hw_stats *hw_stats = &adapter->hw_stats; |
1565 | struct net_device_stats *net_stats = &adapter->net_stats; | 1565 | struct net_device_stats *net_stats = &netdev->stats; |
1566 | 1566 | ||
1567 | atl1c_update_hw_stats(adapter); | 1567 | atl1c_update_hw_stats(adapter); |
1568 | net_stats->rx_packets = hw_stats->rx_ok; | 1568 | net_stats->rx_packets = hw_stats->rx_ok; |
@@ -1590,7 +1590,7 @@ static struct net_device_stats *atl1c_get_stats(struct net_device *netdev) | |||
1590 | net_stats->tx_aborted_errors = hw_stats->tx_abort_col; | 1590 | net_stats->tx_aborted_errors = hw_stats->tx_abort_col; |
1591 | net_stats->tx_window_errors = hw_stats->tx_late_col; | 1591 | net_stats->tx_window_errors = hw_stats->tx_late_col; |
1592 | 1592 | ||
1593 | return &adapter->net_stats; | 1593 | return net_stats; |
1594 | } | 1594 | } |
1595 | 1595 | ||
1596 | static inline void atl1c_clear_phy_int(struct atl1c_adapter *adapter) | 1596 | static inline void atl1c_clear_phy_int(struct atl1c_adapter *adapter) |
@@ -1700,7 +1700,7 @@ static irqreturn_t atl1c_intr(int irq, void *data) | |||
1700 | 1700 | ||
1701 | /* link event */ | 1701 | /* link event */ |
1702 | if (status & (ISR_GPHY | ISR_MANUAL)) { | 1702 | if (status & (ISR_GPHY | ISR_MANUAL)) { |
1703 | adapter->net_stats.tx_carrier_errors++; | 1703 | netdev->stats.tx_carrier_errors++; |
1704 | atl1c_link_chg_event(adapter); | 1704 | atl1c_link_chg_event(adapter); |
1705 | break; | 1705 | break; |
1706 | } | 1706 | } |