diff options
author | Alexander Lobakin <alobakin@pm.me> | 2021-10-23 12:19:16 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-25 17:33:16 -0700 |
commit | fd559a943e3ad919b47ee480e3edb230a818a6b1 (patch) | |
tree | fa33162e97599dee2d4b1cb84c950c42fe05ad27 /drivers/net/ethernet/asix | |
parent | dcd63d4326802cec525de2a4775019849958125c (diff) | |
download | lwn-fd559a943e3ad919b47ee480e3edb230a818a6b1.tar.gz lwn-fd559a943e3ad919b47ee480e3edb230a818a6b1.zip |
ax88796c: fix fetching error stats from percpu containers
rx_dropped, tx_dropped, rx_frame_errors and rx_crc_errors are being
wrongly fetched from the target container rather than source percpu
ones.
No idea if that goes from the vendor driver or was brainoed during
the refactoring, but fix it either way.
Fixes: a97c69ba4f30e ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Acked-by: Łukasz Stelmach <l.stelmach@samsung.com>
Link: https://lore.kernel.org/r/20211023121148.113466-1-alobakin@pm.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/asix')
-rw-r--r-- | drivers/net/ethernet/asix/ax88796c_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c index cfc597f72e3d..91fa0499ea6a 100644 --- a/drivers/net/ethernet/asix/ax88796c_main.c +++ b/drivers/net/ethernet/asix/ax88796c_main.c @@ -672,10 +672,10 @@ static void ax88796c_get_stats64(struct net_device *ndev, stats->tx_packets += tx_packets; stats->tx_bytes += tx_bytes; - rx_dropped += stats->rx_dropped; - tx_dropped += stats->tx_dropped; - rx_frame_errors += stats->rx_frame_errors; - rx_crc_errors += stats->rx_crc_errors; + rx_dropped += s->rx_dropped; + tx_dropped += s->tx_dropped; + rx_frame_errors += s->rx_frame_errors; + rx_crc_errors += s->rx_crc_errors; } stats->rx_dropped = rx_dropped; |