diff options
author | Ajit Khaparde <ajitkhaparde@gmail.com> | 2009-10-06 22:46:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-08 01:00:28 -0400 |
commit | bcc90f555b4eb82604436f7ab6a7853c4b5997a3 (patch) | |
tree | 9e37e65ff80136a47f67e415cab951cd6df86090 /drivers | |
parent | 5fe31deffa097795aed7ab276c90287823d26497 (diff) |
qlge: Use the instance of net_device_stats from net_device.
Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/qlge/qlge.h | 1 | ||||
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 3ec6e85587a2..9e53ca9c3b43 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -1516,7 +1516,6 @@ struct ql_adapter { | |||
1516 | 1516 | ||
1517 | union flash_params flash; | 1517 | union flash_params flash; |
1518 | 1518 | ||
1519 | struct net_device_stats stats; | ||
1520 | struct workqueue_struct *workqueue; | 1519 | struct workqueue_struct *workqueue; |
1521 | struct delayed_work asic_reset_work; | 1520 | struct delayed_work asic_reset_work; |
1522 | struct delayed_work mpi_reset_work; | 1521 | struct delayed_work mpi_reset_work; |
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 61680715cde0..fde5af0d5b46 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -1644,8 +1644,8 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev, | |||
1644 | } | 1644 | } |
1645 | } | 1645 | } |
1646 | 1646 | ||
1647 | qdev->stats.rx_packets++; | 1647 | ndev->stats.rx_packets++; |
1648 | qdev->stats.rx_bytes += skb->len; | 1648 | ndev->stats.rx_bytes += skb->len; |
1649 | skb_record_rx_queue(skb, rx_ring->cq_id); | 1649 | skb_record_rx_queue(skb, rx_ring->cq_id); |
1650 | if (skb->ip_summed == CHECKSUM_UNNECESSARY) { | 1650 | if (skb->ip_summed == CHECKSUM_UNNECESSARY) { |
1651 | if (qdev->vlgrp && | 1651 | if (qdev->vlgrp && |
@@ -1669,6 +1669,7 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev, | |||
1669 | static void ql_process_mac_tx_intr(struct ql_adapter *qdev, | 1669 | static void ql_process_mac_tx_intr(struct ql_adapter *qdev, |
1670 | struct ob_mac_iocb_rsp *mac_rsp) | 1670 | struct ob_mac_iocb_rsp *mac_rsp) |
1671 | { | 1671 | { |
1672 | struct net_device *ndev = qdev->ndev; | ||
1672 | struct tx_ring *tx_ring; | 1673 | struct tx_ring *tx_ring; |
1673 | struct tx_ring_desc *tx_ring_desc; | 1674 | struct tx_ring_desc *tx_ring_desc; |
1674 | 1675 | ||
@@ -1676,8 +1677,8 @@ static void ql_process_mac_tx_intr(struct ql_adapter *qdev, | |||
1676 | tx_ring = &qdev->tx_ring[mac_rsp->txq_idx]; | 1677 | tx_ring = &qdev->tx_ring[mac_rsp->txq_idx]; |
1677 | tx_ring_desc = &tx_ring->q[mac_rsp->tid]; | 1678 | tx_ring_desc = &tx_ring->q[mac_rsp->tid]; |
1678 | ql_unmap_send(qdev, tx_ring_desc, tx_ring_desc->map_cnt); | 1679 | ql_unmap_send(qdev, tx_ring_desc, tx_ring_desc->map_cnt); |
1679 | qdev->stats.tx_bytes += (tx_ring_desc->skb)->len; | 1680 | ndev->stats.tx_bytes += (tx_ring_desc->skb)->len; |
1680 | qdev->stats.tx_packets++; | 1681 | ndev->stats.tx_packets++; |
1681 | dev_kfree_skb(tx_ring_desc->skb); | 1682 | dev_kfree_skb(tx_ring_desc->skb); |
1682 | tx_ring_desc->skb = NULL; | 1683 | tx_ring_desc->skb = NULL; |
1683 | 1684 | ||
@@ -3569,8 +3570,7 @@ static int qlge_change_mtu(struct net_device *ndev, int new_mtu) | |||
3569 | static struct net_device_stats *qlge_get_stats(struct net_device | 3570 | static struct net_device_stats *qlge_get_stats(struct net_device |
3570 | *ndev) | 3571 | *ndev) |
3571 | { | 3572 | { |
3572 | struct ql_adapter *qdev = netdev_priv(ndev); | 3573 | return &ndev->stats; |
3573 | return &qdev->stats; | ||
3574 | } | 3574 | } |
3575 | 3575 | ||
3576 | static void qlge_set_multicast_list(struct net_device *ndev) | 3576 | static void qlge_set_multicast_list(struct net_device *ndev) |