net: fec: Fix Transmitted bytes counter
authorJim Baxter <jim_baxter@mentor.com>
Thu, 27 Jun 2013 18:25:08 +0000 (19:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2013 08:46:12 +0000 (01:46 -0700)
The tx_bytes field was not being updated so the
network card statistics showed 0.0B transmitted.

Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index 5664acd8e0f49684596443ab1424bb231a27c956..aff8a5cd17c773cb370fe4a44575a198081181b7 100644 (file)
@@ -739,6 +739,7 @@ fec_enet_tx(struct net_device *ndev)
                                ndev->stats.tx_carrier_errors++;
                } else {
                        ndev->stats.tx_packets++;
+                       ndev->stats.tx_bytes += bdp->cbd_datlen;
                }
 
                if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS) &&