diff options
| author | Sean Anderson <[email protected]> | 2025-08-25 17:21:34 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-08-27 00:36:28 +0000 |
| commit | 16c8a3a67ec799fc731919e3e51be9af6cdf541d (patch) | |
| tree | b9b3279f50e65eb77a7006a554ad8206ebbc1560 | |
| parent | MAINTAINERS: retire Boris from TLS maintainers (diff) | |
| download | kernel-16c8a3a67ec799fc731919e3e51be9af6cdf541d.tar.gz kernel-16c8a3a67ec799fc731919e3e51be9af6cdf541d.zip | |
net: macb: Fix offset error in gem_update_stats
hw_stats now has only one variable for tx_octets/rx_octets, so we should
only increment p once, not twice. This would cause the statistics to be
reported under the wrong categories in `ethtool -S --all-groups` (which
uses hw_stats) but not `ethtool -S` (which uses ethtool_stats).
Signed-off-by: Sean Anderson <[email protected]>
Fixes: f6af690a295a ("net: cadence: macb: Report standard stats")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index b29c3beae0b2..106885451147 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -3090,7 +3090,7 @@ static void gem_update_stats(struct macb *bp) /* Add GEM_OCTTXH, GEM_OCTRXH */ val = bp->macb_reg_readl(bp, offset + 4); bp->ethtool_stats[i] += ((u64)val) << 32; - *(p++) += ((u64)val) << 32; + *p += ((u64)val) << 32; } } |
