From: John W. Linville Date: Mon, 12 Sep 2005 21:43:18 +0000 (-0700) Subject: [TG3]: Do not count non-error frames dropped by the hardware as rx_errors. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f63b877726135b19ae73108acf9e0ebb4323dda;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [TG3]: Do not count non-error frames dropped by the hardware as rx_errors. Instead, count them as part of rx_missed_errors. Signed-off-by: John W. Linville Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index dc57352e5a97..8da555416858 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6893,8 +6893,7 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) get_stat64(&hw_stats->tx_octets); stats->rx_errors = old_stats->rx_errors + - get_stat64(&hw_stats->rx_errors) + - get_stat64(&hw_stats->rx_discards); + get_stat64(&hw_stats->rx_errors); stats->tx_errors = old_stats->tx_errors + get_stat64(&hw_stats->tx_errors) + get_stat64(&hw_stats->tx_mac_errors) + @@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_stats(struct net_device *dev) stats->rx_crc_errors = old_stats->rx_crc_errors + calc_crc_errors(tp); + stats->rx_missed_errors = old_stats->rx_missed_errors + + get_stat64(&hw_stats->rx_discards); + return stats; }