Skip to content

Commit

Permalink
ax88796c: fix fetching error stats from percpu containers
Browse files Browse the repository at this point in the history
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: a97c69b ("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>
  • Loading branch information
Alexander Lobakin authored and Jakub Kicinski committed Oct 26, 2021
1 parent dcd63d4 commit fd559a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/asix/ax88796c_main.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit fd559a9

Please sign in to comment.