]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
net: cxgb: Use net_device_stats from struct net_device
authorTobias Klauser <tklauser@distanz.ch>
Fri, 7 Apr 2017 08:17:26 +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
port_info, 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/chelsio/cxgb/common.h
drivers/net/ethernet/chelsio/cxgb/cxgb2.c

index 6916c62f2487dd9a9bca381685cea6b4c771ef1f..94b9482f14a55da8dc015c6b2e25e23d1309e00f 100644 (file)
@@ -223,7 +223,6 @@ struct port_info {
        struct cmac *mac;
        struct cphy *phy;
        struct link_config link_config;
-       struct net_device_stats netstats;
 };
 
 struct sge;
index d8aff7a4b3c7cc087139cfefc022b4e8cf75fda5..8623be13bf86f2cc82f579daadc8121dcfb8432d 100644 (file)
@@ -296,7 +296,7 @@ static struct net_device_stats *t1_get_stats(struct net_device *dev)
 {
        struct adapter *adapter = dev->ml_priv;
        struct port_info *p = &adapter->port[dev->if_port];
-       struct net_device_stats *ns = &p->netstats;
+       struct net_device_stats *ns = &dev->stats;
        const struct cmac_statistics *pstats;
 
        /* Do a full update of the MAC stats */