Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7a876fae9da2b1417246a3eac0ac83889f12fa27
Commit:     7a876fae9da2b1417246a3eac0ac83889f12fa27
Parent:     0aa4f3331b1df09a500e1fda84145255303af573
Author:     Satyam Sharma <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 26 22:29:02 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:52:53 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/spider_net_ethtool.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c
index 9427303..85691d2 100644
--- a/drivers/net/spider_net_ethtool.c
+++ b/drivers/net/spider_net_ethtool.c
@@ -28,8 +28,6 @@
 #include "spider_net.h"
 
 
-#define SPIDER_NET_NUM_STATS 13
-
 static struct {
        const char str[ETH_GSTRING_LEN];
 } ethtool_stats_keys[] = {
@@ -151,7 +149,7 @@ static int spider_net_get_sset_count(struct net_device 
*netdev, int sset)
 {
        switch (sset) {
        case ETH_SS_STATS:
-               return SPIDER_NET_NUM_STATS;
+               return ARRAY_SIZE(ethtool_stats_keys);
        default:
                return -EOPNOTSUPP;
        }
@@ -162,13 +160,13 @@ static void spider_net_get_ethtool_stats(struct 
net_device *netdev,
 {
        struct spider_net_card *card = netdev->priv;
 
-       data[0] = card->netdev_stats.tx_packets;
-       data[1] = card->netdev_stats.tx_bytes;
-       data[2] = card->netdev_stats.rx_packets;
-       data[3] = card->netdev_stats.rx_bytes;
-       data[4] = card->netdev_stats.tx_errors;
-       data[5] = card->netdev_stats.tx_dropped;
-       data[6] = card->netdev_stats.rx_dropped;
+       data[0] = netdev->stats.tx_packets;
+       data[1] = netdev->stats.tx_bytes;
+       data[2] = netdev->stats.rx_packets;
+       data[3] = netdev->stats.rx_bytes;
+       data[4] = netdev->stats.tx_errors;
+       data[5] = netdev->stats.tx_dropped;
+       data[6] = netdev->stats.rx_dropped;
        data[7] = card->spider_stats.rx_desc_error;
        data[8] = card->spider_stats.tx_timeouts;
        data[9] = card->spider_stats.alloc_rx_skb_error;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to