]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 16 Aug 2022 13:53:45 +0000 (16:53 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 04:58:30 +0000 (21:58 -0700)
What the driver actually reports as 256-511 is in fact 512-1023, and the
TX packets in the 256-511 bucket are not reported. Fix that.

Fixes: 34efb4cbfb94 ("net: dsa: ocelot: add driver for Felix switch family")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix_vsc9959.c

index b4034b78c0ca7a25a04802b24316a065182d6ff0..5859ef3b242c0b84400d733755c62cbcc0bceffd 100644 (file)
@@ -602,7 +602,8 @@ static const struct ocelot_stat_layout vsc9959_stats_layout[] = {
        { .offset = 0x87,       .name = "tx_frames_below_65_octets", },
        { .offset = 0x88,       .name = "tx_frames_65_to_127_octets", },
        { .offset = 0x89,       .name = "tx_frames_128_255_octets", },
-       { .offset = 0x8B,       .name = "tx_frames_256_511_octets", },
+       { .offset = 0x8A,       .name = "tx_frames_256_511_octets", },
+       { .offset = 0x8B,       .name = "tx_frames_512_1023_octets", },
        { .offset = 0x8C,       .name = "tx_frames_1024_1526_octets", },
        { .offset = 0x8D,       .name = "tx_frames_over_1526_octets", },
        { .offset = 0x8E,       .name = "tx_yellow_prio_0", },