aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSatyam Sharma <satyam@infradead.org>2007-09-27 01:29:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:53 -0400
commit7a876fae9da2b1417246a3eac0ac83889f12fa27 (patch)
treeca72c3cfc1f3b144c81299e3f6d4b1aa27e2cf4c /drivers/net
parent0aa4f3331b1df09a500e1fda84145255303af573 (diff)
[SPIDERNET] spider_net_ethtool: Keep up with recent netdev stats changes
drivers/net/spider_net_ethtool.c: In function 'spider_net_get_ethtool_stats': drivers/net/spider_net_ethtool.c:160: error: structure has no member named 'netdev_stats' drivers/net/spider_net_ethtool.c:161: error: structure has no member named 'netdev_stats' drivers/net/spider_net_ethtool.c:162: error: structure has no member named 'netdev_stats' drivers/net/spider_net_ethtool.c:163: error: structure has no member named 'netdev_stats' drivers/net/spider_net_ethtool.c:164: error: structure has no member named 'netdev_stats' drivers/net/spider_net_ethtool.c:165: error: structure has no member named 'netdev_stats' drivers/net/spider_net_ethtool.c:166: error: structure has no member named 'netdev_stats' make[2]: *** [drivers/net/spider_net_ethtool.o] Error 1 Also do another ARRAY_SIZE() cleanup while at it. Signed-off-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/spider_net_ethtool.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c
index 94273037102f..85691d2a0be2 100644
--- a/drivers/net/spider_net_ethtool.c
+++ b/drivers/net/spider_net_ethtool.c
@@ -28,8 +28,6 @@
28#include "spider_net.h" 28#include "spider_net.h"
29 29
30 30
31#define SPIDER_NET_NUM_STATS 13
32
33static struct { 31static struct {
34 const char str[ETH_GSTRING_LEN]; 32 const char str[ETH_GSTRING_LEN];
35} ethtool_stats_keys[] = { 33} ethtool_stats_keys[] = {
@@ -151,7 +149,7 @@ static int spider_net_get_sset_count(struct net_device *netdev, int sset)
151{ 149{
152 switch (sset) { 150 switch (sset) {
153 case ETH_SS_STATS: 151 case ETH_SS_STATS:
154 return SPIDER_NET_NUM_STATS; 152 return ARRAY_SIZE(ethtool_stats_keys);
155 default: 153 default:
156 return -EOPNOTSUPP; 154 return -EOPNOTSUPP;
157 } 155 }
@@ -162,13 +160,13 @@ static void spider_net_get_ethtool_stats(struct net_device *netdev,
162{ 160{
163 struct spider_net_card *card = netdev->priv; 161 struct spider_net_card *card = netdev->priv;
164 162
165 data[0] = card->netdev_stats.tx_packets; 163 data[0] = netdev->stats.tx_packets;
166 data[1] = card->netdev_stats.tx_bytes; 164 data[1] = netdev->stats.tx_bytes;
167 data[2] = card->netdev_stats.rx_packets; 165 data[2] = netdev->stats.rx_packets;
168 data[3] = card->netdev_stats.rx_bytes; 166 data[3] = netdev->stats.rx_bytes;
169 data[4] = card->netdev_stats.tx_errors; 167 data[4] = netdev->stats.tx_errors;
170 data[5] = card->netdev_stats.tx_dropped; 168 data[5] = netdev->stats.tx_dropped;
171 data[6] = card->netdev_stats.rx_dropped; 169 data[6] = netdev->stats.rx_dropped;
172 data[7] = card->spider_stats.rx_desc_error; 170 data[7] = card->spider_stats.rx_desc_error;
173 data[8] = card->spider_stats.tx_timeouts; 171 data[8] = card->spider_stats.tx_timeouts;
174 data[9] = card->spider_stats.alloc_rx_skb_error; 172 data[9] = card->spider_stats.alloc_rx_skb_error;