Skip to content

Commit 70f010d

Browse files
vladimirolteankuba-moo
authored andcommitted
net: mscc: ocelot: fix pMAC TX RMON stats for bucket 256-511 and above
The typo from ocelot_port_rmon_stats_cb() was also carried over to ocelot_port_pmac_rmon_stats_cb() as well, leading to incorrect TX RMON stats for the pMAC too. Fixes: ab3f97a ("net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959") Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 52eda46 commit 70f010d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/mscc/ocelot_stats.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,10 @@ static void ocelot_port_pmac_rmon_stats_cb(struct ocelot *ocelot, int port,
610610
rmon_stats->hist_tx[0] = s[OCELOT_STAT_TX_PMAC_64];
611611
rmon_stats->hist_tx[1] = s[OCELOT_STAT_TX_PMAC_65_127];
612612
rmon_stats->hist_tx[2] = s[OCELOT_STAT_TX_PMAC_128_255];
613-
rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_PMAC_128_255];
614-
rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_PMAC_256_511];
615-
rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_PMAC_512_1023];
616-
rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_PMAC_1024_1526];
613+
rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_PMAC_256_511];
614+
rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_PMAC_512_1023];
615+
rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_PMAC_1024_1526];
616+
rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_PMAC_1527_MAX];
617617
}
618618

619619
void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port,

0 commit comments

Comments
 (0)