diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-03 03:52:43 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-03 09:44:51 -0700 |
commit | 1a18abaa87c4c68a13c2ffcace39a078605b980a (patch) | |
tree | 3ac7ed4d7ef48ae8d3095f60272eb5681596d982 /drivers/net/tulip/tulip_core.c | |
parent | ae8abfa00efb8ec550f772cbd1e1854977d06212 (diff) |
tulip: use integrated netdev stats
struct tulip_private is a bit large (order-1 allocation even on 32bit
arch), try to shrink it, remove its net_device_stats field.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/tulip_core.c')
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 3a8d7efa2ac..2c39f259121 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c @@ -725,7 +725,7 @@ static void tulip_clean_tx_ring(struct tulip_private *tp) int status = le32_to_cpu(tp->tx_ring[entry].status); if (status < 0) { - tp->stats.tx_errors++; /* It wasn't Txed */ + tp->dev->stats.tx_errors++; /* It wasn't Txed */ tp->tx_ring[entry].status = 0; } @@ -781,8 +781,8 @@ static void tulip_down (struct net_device *dev) /* release any unconsumed transmit buffers */ tulip_clean_tx_ring(tp); - if (ioread32 (ioaddr + CSR6) != 0xffffffff) - tp->stats.rx_missed_errors += ioread32 (ioaddr + CSR8) & 0xffff; + if (ioread32(ioaddr + CSR6) != 0xffffffff) + dev->stats.rx_missed_errors += ioread32(ioaddr + CSR8) & 0xffff; spin_unlock_irqrestore (&tp->lock, flags); @@ -864,12 +864,12 @@ static struct net_device_stats *tulip_get_stats(struct net_device *dev) spin_lock_irqsave (&tp->lock, flags); - tp->stats.rx_missed_errors += ioread32(ioaddr + CSR8) & 0xffff; + dev->stats.rx_missed_errors += ioread32(ioaddr + CSR8) & 0xffff; spin_unlock_irqrestore(&tp->lock, flags); } - return &tp->stats; + return &dev->stats; } |