Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

niu: use net_device_stats nowadays available in net_device

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ilpo Järvinen and committed by
David S. Miller
9fd42876 6113b748

+8 -9
+8 -8
drivers/net/niu.c
··· 6078 6078 dropped += rp->rx_dropped; 6079 6079 errors += rp->rx_errors; 6080 6080 } 6081 - np->net_stats.rx_packets = pkts; 6082 - np->net_stats.rx_bytes = bytes; 6083 - np->net_stats.rx_dropped = dropped; 6084 - np->net_stats.rx_errors = errors; 6081 + np->dev->stats.rx_packets = pkts; 6082 + np->dev->stats.rx_bytes = bytes; 6083 + np->dev->stats.rx_dropped = dropped; 6084 + np->dev->stats.rx_errors = errors; 6085 6085 } 6086 6086 6087 6087 static void niu_get_tx_stats(struct niu *np) ··· 6097 6097 bytes += rp->tx_bytes; 6098 6098 errors += rp->tx_errors; 6099 6099 } 6100 - np->net_stats.tx_packets = pkts; 6101 - np->net_stats.tx_bytes = bytes; 6102 - np->net_stats.tx_errors = errors; 6100 + np->dev->stats.tx_packets = pkts; 6101 + np->dev->stats.tx_bytes = bytes; 6102 + np->dev->stats.tx_errors = errors; 6103 6103 } 6104 6104 6105 6105 static struct net_device_stats *niu_get_stats(struct net_device *dev) ··· 6109 6109 niu_get_rx_stats(np); 6110 6110 niu_get_tx_stats(np); 6111 6111 6112 - return &np->net_stats; 6112 + return &dev->stats; 6113 6113 } 6114 6114 6115 6115 static void niu_load_hash_xmac(struct niu *np, u16 *hash)
-1
drivers/net/niu.h
··· 3249 3249 spinlock_t lock; 3250 3250 3251 3251 const struct niu_ops *ops; 3252 - struct net_device_stats net_stats; 3253 3252 union niu_mac_stats mac_stats; 3254 3253 3255 3254 struct rx_ring_info *rx_rings;