diff options
author | Ajit Khaparde <ajitkhaparde@gmail.com> | 2009-10-06 22:42:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-08 01:00:27 -0400 |
commit | 8d24e93309d688d59d4b6cf0b9cffc40337e067d (patch) | |
tree | f5f5b519227d0d49131113ed445883b5fed6b748 /drivers/net/igb/igb_ethtool.c | |
parent | 2d86f1393c62f9c3bae5c1207408ed6559aa3cc4 (diff) |
igb: 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 adapter structure.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index d004c359244c..d46c3212757b 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -45,6 +45,8 @@ struct igb_stats { | |||
45 | 45 | ||
46 | #define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \ | 46 | #define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \ |
47 | offsetof(struct igb_adapter, m) | 47 | offsetof(struct igb_adapter, m) |
48 | #define IGB_NETDEV_STAT(m) FIELD_SIZEOF(struct net_device, m), \ | ||
49 | offsetof(struct net_device, m) | ||
48 | static const struct igb_stats igb_gstrings_stats[] = { | 50 | static const struct igb_stats igb_gstrings_stats[] = { |
49 | { "rx_packets", IGB_STAT(stats.gprc) }, | 51 | { "rx_packets", IGB_STAT(stats.gprc) }, |
50 | { "tx_packets", IGB_STAT(stats.gptc) }, | 52 | { "tx_packets", IGB_STAT(stats.gptc) }, |
@@ -54,22 +56,22 @@ static const struct igb_stats igb_gstrings_stats[] = { | |||
54 | { "tx_broadcast", IGB_STAT(stats.bptc) }, | 56 | { "tx_broadcast", IGB_STAT(stats.bptc) }, |
55 | { "rx_multicast", IGB_STAT(stats.mprc) }, | 57 | { "rx_multicast", IGB_STAT(stats.mprc) }, |
56 | { "tx_multicast", IGB_STAT(stats.mptc) }, | 58 | { "tx_multicast", IGB_STAT(stats.mptc) }, |
57 | { "rx_errors", IGB_STAT(net_stats.rx_errors) }, | 59 | { "rx_errors", IGB_NETDEV_STAT(stats.rx_errors) }, |
58 | { "tx_errors", IGB_STAT(net_stats.tx_errors) }, | 60 | { "tx_errors", IGB_NETDEV_STAT(stats.tx_errors) }, |
59 | { "tx_dropped", IGB_STAT(net_stats.tx_dropped) }, | 61 | { "tx_dropped", IGB_NETDEV_STAT(stats.tx_dropped) }, |
60 | { "multicast", IGB_STAT(stats.mprc) }, | 62 | { "multicast", IGB_STAT(stats.mprc) }, |
61 | { "collisions", IGB_STAT(stats.colc) }, | 63 | { "collisions", IGB_STAT(stats.colc) }, |
62 | { "rx_length_errors", IGB_STAT(net_stats.rx_length_errors) }, | 64 | { "rx_length_errors", IGB_NETDEV_STAT(stats.rx_length_errors) }, |
63 | { "rx_over_errors", IGB_STAT(net_stats.rx_over_errors) }, | 65 | { "rx_over_errors", IGB_NETDEV_STAT(stats.rx_over_errors) }, |
64 | { "rx_crc_errors", IGB_STAT(stats.crcerrs) }, | 66 | { "rx_crc_errors", IGB_STAT(stats.crcerrs) }, |
65 | { "rx_frame_errors", IGB_STAT(net_stats.rx_frame_errors) }, | 67 | { "rx_frame_errors", IGB_NETDEV_STAT(stats.rx_frame_errors) }, |
66 | { "rx_no_buffer_count", IGB_STAT(stats.rnbc) }, | 68 | { "rx_no_buffer_count", IGB_STAT(stats.rnbc) }, |
67 | { "rx_queue_drop_packet_count", IGB_STAT(net_stats.rx_fifo_errors) }, | 69 | { "rx_queue_drop_packet_count", IGB_NETDEV_STAT(stats.rx_fifo_errors) }, |
68 | { "rx_missed_errors", IGB_STAT(stats.mpc) }, | 70 | { "rx_missed_errors", IGB_STAT(stats.mpc) }, |
69 | { "tx_aborted_errors", IGB_STAT(stats.ecol) }, | 71 | { "tx_aborted_errors", IGB_STAT(stats.ecol) }, |
70 | { "tx_carrier_errors", IGB_STAT(stats.tncrs) }, | 72 | { "tx_carrier_errors", IGB_STAT(stats.tncrs) }, |
71 | { "tx_fifo_errors", IGB_STAT(net_stats.tx_fifo_errors) }, | 73 | { "tx_fifo_errors", IGB_NETDEV_STAT(stats.tx_fifo_errors) }, |
72 | { "tx_heartbeat_errors", IGB_STAT(net_stats.tx_heartbeat_errors) }, | 74 | { "tx_heartbeat_errors", IGB_NETDEV_STAT(stats.tx_heartbeat_errors) }, |
73 | { "tx_window_errors", IGB_STAT(stats.latecol) }, | 75 | { "tx_window_errors", IGB_STAT(stats.latecol) }, |
74 | { "tx_abort_late_coll", IGB_STAT(stats.latecol) }, | 76 | { "tx_abort_late_coll", IGB_STAT(stats.latecol) }, |
75 | { "tx_deferred_ok", IGB_STAT(stats.dc) }, | 77 | { "tx_deferred_ok", IGB_STAT(stats.dc) }, |