diff options
author | Ajit Khaparde <ajitkhaparde@gmail.com> | 2009-10-06 22:45:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-08 01:00:25 -0400 |
commit | 6dc3494183db0b93f49b193ac115073b72453b9c (patch) | |
tree | 80b22d65852e5a5971c1abeefbc7f54905b34d89 /drivers/net/myri10ge | |
parent | 5a4d631154de41bb43eefb03d2124224c23c1fa4 (diff) |
myri10ge: 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 myri10ge_priv structure.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 6930c87f362e..29c9fe2951e0 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -207,7 +207,6 @@ struct myri10ge_priv { | |||
207 | int big_bytes; | 207 | int big_bytes; |
208 | int max_intr_slots; | 208 | int max_intr_slots; |
209 | struct net_device *dev; | 209 | struct net_device *dev; |
210 | struct net_device_stats stats; | ||
211 | spinlock_t stats_lock; | 210 | spinlock_t stats_lock; |
212 | u8 __iomem *sram; | 211 | u8 __iomem *sram; |
213 | int sram_size; | 212 | int sram_size; |
@@ -1821,7 +1820,7 @@ myri10ge_get_ethtool_stats(struct net_device *netdev, | |||
1821 | /* force stats update */ | 1820 | /* force stats update */ |
1822 | (void)myri10ge_get_stats(netdev); | 1821 | (void)myri10ge_get_stats(netdev); |
1823 | for (i = 0; i < MYRI10GE_NET_STATS_LEN; i++) | 1822 | for (i = 0; i < MYRI10GE_NET_STATS_LEN; i++) |
1824 | data[i] = ((unsigned long *)&mgp->stats)[i]; | 1823 | data[i] = ((unsigned long *)&netdev->stats)[i]; |
1825 | 1824 | ||
1826 | data[i++] = (unsigned int)mgp->tx_boundary; | 1825 | data[i++] = (unsigned int)mgp->tx_boundary; |
1827 | data[i++] = (unsigned int)mgp->wc_enabled; | 1826 | data[i++] = (unsigned int)mgp->wc_enabled; |
@@ -2991,7 +2990,7 @@ static struct net_device_stats *myri10ge_get_stats(struct net_device *dev) | |||
2991 | { | 2990 | { |
2992 | struct myri10ge_priv *mgp = netdev_priv(dev); | 2991 | struct myri10ge_priv *mgp = netdev_priv(dev); |
2993 | struct myri10ge_slice_netstats *slice_stats; | 2992 | struct myri10ge_slice_netstats *slice_stats; |
2994 | struct net_device_stats *stats = &mgp->stats; | 2993 | struct net_device_stats *stats = &dev->stats; |
2995 | int i; | 2994 | int i; |
2996 | 2995 | ||
2997 | spin_lock(&mgp->stats_lock); | 2996 | spin_lock(&mgp->stats_lock); |