Commit a2c483a1 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00959ade
...@@ -559,7 +559,6 @@ struct atl1c_adapter { ...@@ -559,7 +559,6 @@ struct atl1c_adapter {
struct napi_struct napi; struct napi_struct napi;
struct atl1c_hw hw; struct atl1c_hw hw;
struct atl1c_hw_stats hw_stats; struct atl1c_hw_stats hw_stats;
struct net_device_stats net_stats;
struct mii_if_info mii; /* MII interface info */ struct mii_if_info mii; /* MII interface info */
u16 rx_buffer_len; u16 rx_buffer_len;
......
...@@ -1562,7 +1562,7 @@ static struct net_device_stats *atl1c_get_stats(struct net_device *netdev) ...@@ -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_adapter *adapter = netdev_priv(netdev);
struct atl1c_hw_stats *hw_stats = &adapter->hw_stats; 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); atl1c_update_hw_stats(adapter);
net_stats->rx_packets = hw_stats->rx_ok; 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,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_aborted_errors = hw_stats->tx_abort_col;
net_stats->tx_window_errors = hw_stats->tx_late_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) 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,7 +1700,7 @@ static irqreturn_t atl1c_intr(int irq, void *data)
/* link event */ /* link event */
if (status & (ISR_GPHY | ISR_MANUAL)) { if (status & (ISR_GPHY | ISR_MANUAL)) {
adapter->net_stats.tx_carrier_errors++; netdev->stats.tx_carrier_errors++;
atl1c_link_chg_event(adapter); atl1c_link_chg_event(adapter);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment