diff options
author | Ajit Khaparde <ajitkhaparde@gmail.com> | 2009-10-06 22:46:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-08 01:00:29 -0400 |
commit | 0cdc03698f2586923ad3b9fca06643ff5675f221 (patch) | |
tree | a403607562ecd5588b7735093ddbdb32d61f032a /drivers/net/ixgb/ixgb_ethtool.c | |
parent | bcc90f555b4eb82604436f7ab6a7853c4b5997a3 (diff) |
ixgb: 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/net/ixgb/ixgb_ethtool.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_ethtool.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index 288ee1d0f431..deeb25da0702 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c | |||
@@ -42,30 +42,32 @@ struct ixgb_stats { | |||
42 | 42 | ||
43 | #define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \ | 43 | #define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \ |
44 | offsetof(struct ixgb_adapter, m) | 44 | offsetof(struct ixgb_adapter, m) |
45 | #define IXGB_NETDEV_STAT(m) FIELD_SIZEOF(struct net_device, m), \ | ||
46 | offsetof(struct net_device, m) | ||
45 | static struct ixgb_stats ixgb_gstrings_stats[] = { | 47 | static struct ixgb_stats ixgb_gstrings_stats[] = { |
46 | {"rx_packets", IXGB_STAT(net_stats.rx_packets)}, | 48 | {"rx_packets", IXGB_NETDEV_STAT(stats.rx_packets)}, |
47 | {"tx_packets", IXGB_STAT(net_stats.tx_packets)}, | 49 | {"tx_packets", IXGB_NETDEV_STAT(stats.tx_packets)}, |
48 | {"rx_bytes", IXGB_STAT(net_stats.rx_bytes)}, | 50 | {"rx_bytes", IXGB_NETDEV_STAT(stats.rx_bytes)}, |
49 | {"tx_bytes", IXGB_STAT(net_stats.tx_bytes)}, | 51 | {"tx_bytes", IXGB_NETDEV_STAT(stats.tx_bytes)}, |
50 | {"rx_errors", IXGB_STAT(net_stats.rx_errors)}, | 52 | {"rx_errors", IXGB_NETDEV_STAT(stats.rx_errors)}, |
51 | {"tx_errors", IXGB_STAT(net_stats.tx_errors)}, | 53 | {"tx_errors", IXGB_NETDEV_STAT(stats.tx_errors)}, |
52 | {"rx_dropped", IXGB_STAT(net_stats.rx_dropped)}, | 54 | {"rx_dropped", IXGB_NETDEV_STAT(stats.rx_dropped)}, |
53 | {"tx_dropped", IXGB_STAT(net_stats.tx_dropped)}, | 55 | {"tx_dropped", IXGB_NETDEV_STAT(stats.tx_dropped)}, |
54 | {"multicast", IXGB_STAT(net_stats.multicast)}, | 56 | {"multicast", IXGB_NETDEV_STAT(stats.multicast)}, |
55 | {"collisions", IXGB_STAT(net_stats.collisions)}, | 57 | {"collisions", IXGB_NETDEV_STAT(stats.collisions)}, |
56 | 58 | ||
57 | /* { "rx_length_errors", IXGB_STAT(net_stats.rx_length_errors) }, */ | 59 | /* { "rx_length_errors", IXGB_NETDEV_STAT(stats.rx_length_errors) }, */ |
58 | {"rx_over_errors", IXGB_STAT(net_stats.rx_over_errors)}, | 60 | {"rx_over_errors", IXGB_NETDEV_STAT(stats.rx_over_errors)}, |
59 | {"rx_crc_errors", IXGB_STAT(net_stats.rx_crc_errors)}, | 61 | {"rx_crc_errors", IXGB_NETDEV_STAT(stats.rx_crc_errors)}, |
60 | {"rx_frame_errors", IXGB_STAT(net_stats.rx_frame_errors)}, | 62 | {"rx_frame_errors", IXGB_NETDEV_STAT(stats.rx_frame_errors)}, |
61 | {"rx_no_buffer_count", IXGB_STAT(stats.rnbc)}, | 63 | {"rx_no_buffer_count", IXGB_STAT(stats.rnbc)}, |
62 | {"rx_fifo_errors", IXGB_STAT(net_stats.rx_fifo_errors)}, | 64 | {"rx_fifo_errors", IXGB_NETDEV_STAT(stats.rx_fifo_errors)}, |
63 | {"rx_missed_errors", IXGB_STAT(net_stats.rx_missed_errors)}, | 65 | {"rx_missed_errors", IXGB_NETDEV_STAT(stats.rx_missed_errors)}, |
64 | {"tx_aborted_errors", IXGB_STAT(net_stats.tx_aborted_errors)}, | 66 | {"tx_aborted_errors", IXGB_NETDEV_STAT(stats.tx_aborted_errors)}, |
65 | {"tx_carrier_errors", IXGB_STAT(net_stats.tx_carrier_errors)}, | 67 | {"tx_carrier_errors", IXGB_NETDEV_STAT(stats.tx_carrier_errors)}, |
66 | {"tx_fifo_errors", IXGB_STAT(net_stats.tx_fifo_errors)}, | 68 | {"tx_fifo_errors", IXGB_NETDEV_STAT(stats.tx_fifo_errors)}, |
67 | {"tx_heartbeat_errors", IXGB_STAT(net_stats.tx_heartbeat_errors)}, | 69 | {"tx_heartbeat_errors", IXGB_NETDEV_STAT(stats.tx_heartbeat_errors)}, |
68 | {"tx_window_errors", IXGB_STAT(net_stats.tx_window_errors)}, | 70 | {"tx_window_errors", IXGB_NETDEV_STAT(stats.tx_window_errors)}, |
69 | {"tx_deferred_ok", IXGB_STAT(stats.dc)}, | 71 | {"tx_deferred_ok", IXGB_STAT(stats.dc)}, |
70 | {"tx_timeout_count", IXGB_STAT(tx_timeout_count) }, | 72 | {"tx_timeout_count", IXGB_STAT(tx_timeout_count) }, |
71 | {"tx_restart_queue", IXGB_STAT(restart_queue) }, | 73 | {"tx_restart_queue", IXGB_STAT(restart_queue) }, |