aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajitkhaparde@gmail.com>2009-10-06 22:42:23 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-08 01:00:27 -0400
commit5fe31deffa097795aed7ab276c90287823d26497 (patch)
treea7fbbfd16edf08d8795303358e586d9bb634a9cc /drivers/net/e1000/e1000_ethtool.c
parent8d24e93309d688d59d4b6cf0b9cffc40337e067d (diff)
e1000: 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/e1000/e1000_ethtool.c')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 490b2b7cd3ab..e25b339eb5bd 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -39,6 +39,8 @@ struct e1000_stats {
39 39
40#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \ 40#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \
41 offsetof(struct e1000_adapter, m) 41 offsetof(struct e1000_adapter, m)
42#define E1000_NETDEV_STAT(m) FIELD_SIZEOF(struct net_device, m), \
43 offsetof(struct net_device, m)
42static const struct e1000_stats e1000_gstrings_stats[] = { 44static const struct e1000_stats e1000_gstrings_stats[] = {
43 { "rx_packets", E1000_STAT(stats.gprc) }, 45 { "rx_packets", E1000_STAT(stats.gprc) },
44 { "tx_packets", E1000_STAT(stats.gptc) }, 46 { "tx_packets", E1000_STAT(stats.gptc) },
@@ -50,19 +52,19 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
50 { "tx_multicast", E1000_STAT(stats.mptc) }, 52 { "tx_multicast", E1000_STAT(stats.mptc) },
51 { "rx_errors", E1000_STAT(stats.rxerrc) }, 53 { "rx_errors", E1000_STAT(stats.rxerrc) },
52 { "tx_errors", E1000_STAT(stats.txerrc) }, 54 { "tx_errors", E1000_STAT(stats.txerrc) },
53 { "tx_dropped", E1000_STAT(net_stats.tx_dropped) }, 55 { "tx_dropped", E1000_NETDEV_STAT(stats.tx_dropped) },
54 { "multicast", E1000_STAT(stats.mprc) }, 56 { "multicast", E1000_STAT(stats.mprc) },
55 { "collisions", E1000_STAT(stats.colc) }, 57 { "collisions", E1000_STAT(stats.colc) },
56 { "rx_length_errors", E1000_STAT(stats.rlerrc) }, 58 { "rx_length_errors", E1000_STAT(stats.rlerrc) },
57 { "rx_over_errors", E1000_STAT(net_stats.rx_over_errors) }, 59 { "rx_over_errors", E1000_NETDEV_STAT(stats.rx_over_errors) },
58 { "rx_crc_errors", E1000_STAT(stats.crcerrs) }, 60 { "rx_crc_errors", E1000_STAT(stats.crcerrs) },
59 { "rx_frame_errors", E1000_STAT(net_stats.rx_frame_errors) }, 61 { "rx_frame_errors", E1000_NETDEV_STAT(stats.rx_frame_errors) },
60 { "rx_no_buffer_count", E1000_STAT(stats.rnbc) }, 62 { "rx_no_buffer_count", E1000_STAT(stats.rnbc) },
61 { "rx_missed_errors", E1000_STAT(stats.mpc) }, 63 { "rx_missed_errors", E1000_STAT(stats.mpc) },
62 { "tx_aborted_errors", E1000_STAT(stats.ecol) }, 64 { "tx_aborted_errors", E1000_STAT(stats.ecol) },
63 { "tx_carrier_errors", E1000_STAT(stats.tncrs) }, 65 { "tx_carrier_errors", E1000_STAT(stats.tncrs) },
64 { "tx_fifo_errors", E1000_STAT(net_stats.tx_fifo_errors) }, 66 { "tx_fifo_errors", E1000_NETDEV_STAT(stats.tx_fifo_errors) },
65 { "tx_heartbeat_errors", E1000_STAT(net_stats.tx_heartbeat_errors) }, 67 { "tx_heartbeat_errors", E1000_NETDEV_STAT(stats.tx_heartbeat_errors) },
66 { "tx_window_errors", E1000_STAT(stats.latecol) }, 68 { "tx_window_errors", E1000_STAT(stats.latecol) },
67 { "tx_abort_late_coll", E1000_STAT(stats.latecol) }, 69 { "tx_abort_late_coll", E1000_STAT(stats.latecol) },
68 { "tx_deferred_ok", E1000_STAT(stats.dc) }, 70 { "tx_deferred_ok", E1000_STAT(stats.dc) },