mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
net: bcmgenet: correct per TX/RX ring statistics
[ Upstream commit a6d0b83f25073bdf08b8547aeff961a62c6ab229 ]
The change to track net_device_stats per ring to better support SMP
missed updating the rx_dropped member.
The ndo_get_stats method is also needed to combine the results for
ethtool statistics (-S) before filling in the ethtool structure.
Fixes: 37a30b435b ("net: bcmgenet: Track per TX/RX rings statistics")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aa6a14bc41
commit
49bbf32231
1 changed files with 3 additions and 0 deletions
|
|
@ -995,6 +995,8 @@ static void bcmgenet_get_ethtool_stats(struct net_device *dev,
|
|||
if (netif_running(dev))
|
||||
bcmgenet_update_mib_counters(priv);
|
||||
|
||||
dev->netdev_ops->ndo_get_stats(dev);
|
||||
|
||||
for (i = 0; i < BCMGENET_STATS_LEN; i++) {
|
||||
const struct bcmgenet_stats *s;
|
||||
char *p;
|
||||
|
|
@ -3204,6 +3206,7 @@ static struct net_device_stats *bcmgenet_get_stats(struct net_device *dev)
|
|||
dev->stats.rx_packets = rx_packets;
|
||||
dev->stats.rx_errors = rx_errors;
|
||||
dev->stats.rx_missed_errors = rx_errors;
|
||||
dev->stats.rx_dropped = rx_dropped;
|
||||
return &dev->stats;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue