41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
index 292857c0e601..4417b10da438 100644
|
|
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
@@ -6952,7 +6952,6 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64
|
|
struct stmmac_priv *priv = netdev_priv(dev);
|
|
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
|
u32 rx_cnt = priv->plat->rx_queues_to_use;
|
|
- unsigned int start;
|
|
int q;
|
|
|
|
for (q = 0; q < tx_cnt; q++) {
|
|
@@ -6960,11 +6959,8 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64
|
|
u64 tx_packets;
|
|
u64 tx_bytes;
|
|
|
|
- do {
|
|
- start = u64_stats_fetch_begin(&txq_stats->syncp);
|
|
- tx_packets = txq_stats->tx_packets;
|
|
- tx_bytes = txq_stats->tx_bytes;
|
|
- } while (u64_stats_fetch_retry(&txq_stats->syncp, start));
|
|
+ tx_packets = txq_stats->tx_packets;
|
|
+ tx_bytes = txq_stats->tx_bytes;
|
|
|
|
stats->tx_packets += tx_packets;
|
|
stats->tx_bytes += tx_bytes;
|
|
@@ -6975,11 +6971,8 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64
|
|
u64 rx_packets;
|
|
u64 rx_bytes;
|
|
|
|
- do {
|
|
- start = u64_stats_fetch_begin(&rxq_stats->syncp);
|
|
- rx_packets = rxq_stats->rx_packets;
|
|
- rx_bytes = rxq_stats->rx_bytes;
|
|
- } while (u64_stats_fetch_retry(&rxq_stats->syncp, start));
|
|
+ rx_packets = rxq_stats->rx_packets;
|
|
+ rx_bytes = rxq_stats->rx_bytes;
|
|
|
|
stats->rx_packets += rx_packets;
|
|
stats->rx_bytes += rx_bytes;
|