net: emac: Use net_device_stats from struct net_device
authorTobias Klauser <tklauser@distanz.ch>
Fri, 7 Apr 2017 08:17:29 +0000 (10:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Apr 2017 14:03:33 +0000 (07:03 -0700)
Instead of using a private copy of struct net_device_stats in
struct emac_instance, use stats from struct net_device.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/emac/core.c
drivers/net/ethernet/ibm/emac/core.h

index 0f9cd92fdc5e289f1da487a3dac904fe87c50a1a..508923f39ccfe0cbc39ed23305af46860eef32c9 100644 (file)
@@ -1929,7 +1929,7 @@ static struct net_device_stats *emac_stats(struct net_device *ndev)
        struct emac_instance *dev = netdev_priv(ndev);
        struct emac_stats *st = &dev->stats;
        struct emac_error_stats *est = &dev->estats;
-       struct net_device_stats *nst = &dev->nstats;
+       struct net_device_stats *nst = &ndev->stats;
        unsigned long flags;
 
        DBG2(dev, "stats" NL);
index 0710a6685489355fdd74b89259be8b360b52c557..f10e156641d511d2d5d6a133dd3a8df18498cf69 100644 (file)
@@ -265,7 +265,6 @@ struct emac_instance {
        /* Stats
         */
        struct emac_error_stats         estats;
-       struct net_device_stats         nstats;
        struct emac_stats               stats;
 
        /* Misc