aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 6de4675016b5..119aa2000c24 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -434,7 +434,6 @@ static void gfar_init_mac(struct net_device *ndev)
434static struct net_device_stats *gfar_get_stats(struct net_device *dev) 434static struct net_device_stats *gfar_get_stats(struct net_device *dev)
435{ 435{
436 struct gfar_private *priv = netdev_priv(dev); 436 struct gfar_private *priv = netdev_priv(dev);
437 struct netdev_queue *txq;
438 unsigned long rx_packets = 0, rx_bytes = 0, rx_dropped = 0; 437 unsigned long rx_packets = 0, rx_bytes = 0, rx_dropped = 0;
439 unsigned long tx_packets = 0, tx_bytes = 0; 438 unsigned long tx_packets = 0, tx_bytes = 0;
440 int i = 0; 439 int i = 0;
@@ -450,9 +449,8 @@ static struct net_device_stats *gfar_get_stats(struct net_device *dev)
450 dev->stats.rx_dropped = rx_dropped; 449 dev->stats.rx_dropped = rx_dropped;
451 450
452 for (i = 0; i < priv->num_tx_queues; i++) { 451 for (i = 0; i < priv->num_tx_queues; i++) {
453 txq = netdev_get_tx_queue(dev, i); 452 tx_bytes += priv->tx_queue[i]->stats.tx_bytes;
454 tx_bytes += txq->tx_bytes; 453 tx_packets += priv->tx_queue[i]->stats.tx_packets;
455 tx_packets += txq->tx_packets;
456 } 454 }
457 455
458 dev->stats.tx_bytes = tx_bytes; 456 dev->stats.tx_bytes = tx_bytes;
@@ -2109,8 +2107,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
2109 } 2107 }
2110 2108
2111 /* Update transmit stats */ 2109 /* Update transmit stats */
2112 txq->tx_bytes += skb->len; 2110 tx_queue->stats.tx_bytes += skb->len;
2113 txq->tx_packets ++; 2111 tx_queue->stats.tx_packets++;
2114 2112
2115 txbdp = txbdp_start = tx_queue->cur_tx; 2113 txbdp = txbdp_start = tx_queue->cur_tx;
2116 lstatus = txbdp->lstatus; 2114 lstatus = txbdp->lstatus;