summaryrefslogtreecommitdiffstats
path: root/drivers/net/macsec.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-09-21 08:52:16 +0000
committerDavid S. Miller <davem@davemloft.net>2023-10-01 16:33:01 +0100
commit0b068c714ca9479d2783cc333fff5bc2d4a6d45c (patch)
treed3458ee59ddd5407e55d99538d821706190d49ca /drivers/net/macsec.c
parenta63df366d0915a85d31498d295e6ae81815badde (diff)
downloadlinux-stable-0b068c714ca9479d2783cc333fff5bc2d4a6d45c.tar.gz
linux-stable-0b068c714ca9479d2783cc333fff5bc2d4a6d45c.tar.bz2
linux-stable-0b068c714ca9479d2783cc333fff5bc2d4a6d45c.zip
net: add DEV_STATS_READ() helper
Companion of DEV_STATS_INC() & DEV_STATS_ADD(). This is going to be used in the series. Use it in macsec_get_stats64(). Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macsec.c')
-rw-r--r--drivers/net/macsec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index b7e151439c48..7a44e1cbe305 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -3655,9 +3655,9 @@ static void macsec_get_stats64(struct net_device *dev,
dev_fetch_sw_netstats(s, dev->tstats);
- s->rx_dropped = atomic_long_read(&dev->stats.__rx_dropped);
- s->tx_dropped = atomic_long_read(&dev->stats.__tx_dropped);
- s->rx_errors = atomic_long_read(&dev->stats.__rx_errors);
+ s->rx_dropped = DEV_STATS_READ(dev, rx_dropped);
+ s->tx_dropped = DEV_STATS_READ(dev, tx_dropped);
+ s->rx_errors = DEV_STATS_READ(dev, rx_errors);
}
static int macsec_get_iflink(const struct net_device *dev)