Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66749
b: refs/heads/master
c: 7a876fa
h: refs/heads/master
i:
  66747: 3ecab01
v: v3
  • Loading branch information
Satyam Sharma authored and David S. Miller committed Oct 10, 2007
1 parent 6a46b41 commit 1f91ef5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0aa4f3331b1df09a500e1fda84145255303af573
refs/heads/master: 7a876fae9da2b1417246a3eac0ac83889f12fa27
18 changes: 8 additions & 10 deletions trunk/drivers/net/spider_net_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down

0 comments on commit 1f91ef5

Please sign in to comment.