aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx/atl1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atlx/atl1.c')
-rw-r--r--drivers/net/atlx/atl1.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 246d92b42636..6cc47616b6d4 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1662,6 +1662,7 @@ static void atl1_via_workaround(struct atl1_adapter *adapter)
1662 1662
1663static void atl1_inc_smb(struct atl1_adapter *adapter) 1663static void atl1_inc_smb(struct atl1_adapter *adapter)
1664{ 1664{
1665 struct net_device *netdev = adapter->netdev;
1665 struct stats_msg_block *smb = adapter->smb.smb; 1666 struct stats_msg_block *smb = adapter->smb.smb;
1666 1667
1667 /* Fill out the OS statistics structure */ 1668 /* Fill out the OS statistics structure */
@@ -1704,30 +1705,30 @@ static void atl1_inc_smb(struct atl1_adapter *adapter)
1704 adapter->soft_stats.tx_trunc += smb->tx_trunc; 1705 adapter->soft_stats.tx_trunc += smb->tx_trunc;
1705 adapter->soft_stats.tx_pause += smb->tx_pause; 1706 adapter->soft_stats.tx_pause += smb->tx_pause;
1706 1707
1707 adapter->net_stats.rx_packets = adapter->soft_stats.rx_packets; 1708 netdev->stats.rx_packets = adapter->soft_stats.rx_packets;
1708 adapter->net_stats.tx_packets = adapter->soft_stats.tx_packets; 1709 netdev->stats.tx_packets = adapter->soft_stats.tx_packets;
1709 adapter->net_stats.rx_bytes = adapter->soft_stats.rx_bytes; 1710 netdev->stats.rx_bytes = adapter->soft_stats.rx_bytes;
1710 adapter->net_stats.tx_bytes = adapter->soft_stats.tx_bytes; 1711 netdev->stats.tx_bytes = adapter->soft_stats.tx_bytes;
1711 adapter->net_stats.multicast = adapter->soft_stats.multicast; 1712 netdev->stats.multicast = adapter->soft_stats.multicast;
1712 adapter->net_stats.collisions = adapter->soft_stats.collisions; 1713 netdev->stats.collisions = adapter->soft_stats.collisions;
1713 adapter->net_stats.rx_errors = adapter->soft_stats.rx_errors; 1714 netdev->stats.rx_errors = adapter->soft_stats.rx_errors;
1714 adapter->net_stats.rx_over_errors = 1715 netdev->stats.rx_over_errors =
1715 adapter->soft_stats.rx_missed_errors; 1716 adapter->soft_stats.rx_missed_errors;
1716 adapter->net_stats.rx_length_errors = 1717 netdev->stats.rx_length_errors =
1717 adapter->soft_stats.rx_length_errors; 1718 adapter->soft_stats.rx_length_errors;
1718 adapter->net_stats.rx_crc_errors = adapter->soft_stats.rx_crc_errors; 1719 netdev->stats.rx_crc_errors = adapter->soft_stats.rx_crc_errors;
1719 adapter->net_stats.rx_frame_errors = 1720 netdev->stats.rx_frame_errors =
1720 adapter->soft_stats.rx_frame_errors; 1721 adapter->soft_stats.rx_frame_errors;
1721 adapter->net_stats.rx_fifo_errors = adapter->soft_stats.rx_fifo_errors; 1722 netdev->stats.rx_fifo_errors = adapter->soft_stats.rx_fifo_errors;
1722 adapter->net_stats.rx_missed_errors = 1723 netdev->stats.rx_missed_errors =
1723 adapter->soft_stats.rx_missed_errors; 1724 adapter->soft_stats.rx_missed_errors;
1724 adapter->net_stats.tx_errors = adapter->soft_stats.tx_errors; 1725 netdev->stats.tx_errors = adapter->soft_stats.tx_errors;
1725 adapter->net_stats.tx_fifo_errors = adapter->soft_stats.tx_fifo_errors; 1726 netdev->stats.tx_fifo_errors = adapter->soft_stats.tx_fifo_errors;
1726 adapter->net_stats.tx_aborted_errors = 1727 netdev->stats.tx_aborted_errors =
1727 adapter->soft_stats.tx_aborted_errors; 1728 adapter->soft_stats.tx_aborted_errors;
1728 adapter->net_stats.tx_window_errors = 1729 netdev->stats.tx_window_errors =
1729 adapter->soft_stats.tx_window_errors; 1730 adapter->soft_stats.tx_window_errors;
1730 adapter->net_stats.tx_carrier_errors = 1731 netdev->stats.tx_carrier_errors =
1731 adapter->soft_stats.tx_carrier_errors; 1732 adapter->soft_stats.tx_carrier_errors;
1732} 1733}
1733 1734
@@ -1860,7 +1861,7 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
1860 adapter->rx_buffer_len + NET_IP_ALIGN); 1861 adapter->rx_buffer_len + NET_IP_ALIGN);
1861 if (unlikely(!skb)) { 1862 if (unlikely(!skb)) {
1862 /* Better luck next round */ 1863 /* Better luck next round */
1863 adapter->net_stats.rx_dropped++; 1864 adapter->netdev->stats.rx_dropped++;
1864 break; 1865 break;
1865 } 1866 }
1866 1867
@@ -2983,7 +2984,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2983 netdev->open = &atl1_open; 2984 netdev->open = &atl1_open;
2984 netdev->stop = &atl1_close; 2985 netdev->stop = &atl1_close;
2985 netdev->hard_start_xmit = &atl1_xmit_frame; 2986 netdev->hard_start_xmit = &atl1_xmit_frame;
2986 netdev->get_stats = &atlx_get_stats; 2987
2987 netdev->set_multicast_list = &atlx_set_multi; 2988 netdev->set_multicast_list = &atlx_set_multi;
2988 netdev->set_mac_address = &atl1_set_mac; 2989 netdev->set_mac_address = &atl1_set_mac;
2989 netdev->change_mtu = &atl1_change_mtu; 2990 netdev->change_mtu = &atl1_change_mtu;
@@ -3173,8 +3174,6 @@ static struct atl1_stats atl1_gstrings_stats[] = {
3173 {"tx_bytes", ATL1_STAT(soft_stats.tx_bytes)}, 3174 {"tx_bytes", ATL1_STAT(soft_stats.tx_bytes)},
3174 {"rx_errors", ATL1_STAT(soft_stats.rx_errors)}, 3175 {"rx_errors", ATL1_STAT(soft_stats.rx_errors)},
3175 {"tx_errors", ATL1_STAT(soft_stats.tx_errors)}, 3176 {"tx_errors", ATL1_STAT(soft_stats.tx_errors)},
3176 {"rx_dropped", ATL1_STAT(net_stats.rx_dropped)},
3177 {"tx_dropped", ATL1_STAT(net_stats.tx_dropped)},
3178 {"multicast", ATL1_STAT(soft_stats.multicast)}, 3177 {"multicast", ATL1_STAT(soft_stats.multicast)},
3179 {"collisions", ATL1_STAT(soft_stats.collisions)}, 3178 {"collisions", ATL1_STAT(soft_stats.collisions)},
3180 {"rx_length_errors", ATL1_STAT(soft_stats.rx_length_errors)}, 3179 {"rx_length_errors", ATL1_STAT(soft_stats.rx_length_errors)},