Skip to content

Commit 1228285

Browse files
Sean Andersongregkh
authored andcommitted
net: macb: Fix offset error in gem_update_stats
[ Upstream commit 16c8a3a ] 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 <sean.anderson@linux.dev> Fixes: f6af690 ("net: cadence: macb: Report standard stats") Link: https://patch.msgid.link/20250825172134.681861-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 11a6bd4 commit 1228285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3090,7 +3090,7 @@ static void gem_update_stats(struct macb *bp)
30903090
/* Add GEM_OCTTXH, GEM_OCTRXH */
30913091
val = bp->macb_reg_readl(bp, offset + 4);
30923092
bp->ethtool_stats[i] += ((u64)val) << 32;
3093-
*(p++) += ((u64)val) << 32;
3093+
*p += ((u64)val) << 32;
30943094
}
30953095
}
30963096

0 commit comments

Comments
 (0)