]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
net: cxgb3: Use net_device_stats from struct net_device
authorTobias Klauser <tklauser@distanz.ch>
Fri, 7 Apr 2017 08:17:27 +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.

Cc: Santosh Raspatur <santosh@chelsio.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb3/adapter.h
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c

index 8b395b537330507a21df8a0705f292e077b77e36..087ff0ffb59777e625395b6caf9753116316289c 100644 (file)
@@ -72,7 +72,6 @@ struct port_info {
        struct cphy phy;
        struct cmac mac;
        struct link_config link_config;
-       struct net_device_stats netstats;
        int activity;
        __be32 iscsi_ipv4addr;
        struct iscsi_config iscsic;
index d76491676b5175e52b383e8c17760859b4f69040..2ff6bd139c96ccf077acab356a4464b13fa61b94 100644 (file)
@@ -1489,7 +1489,7 @@ static struct net_device_stats *cxgb_get_stats(struct net_device *dev)
 {
        struct port_info *pi = netdev_priv(dev);
        struct adapter *adapter = pi->adapter;
-       struct net_device_stats *ns = &pi->netstats;
+       struct net_device_stats *ns = &dev->stats;
        const struct mac_stats *pstats;
 
        spin_lock(&adapter->stats_lock);