]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: fix ethtool stats for RTL839x and RTL930x
authorJan Hoffmann <jan@3e8.eu>
Fri, 4 Apr 2025 11:24:29 +0000 (13:24 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Jul 2025 14:46:19 +0000 (16:46 +0200)
commit831c1cd864af6895270fb598185f2d04b3936401
tree8c60954b4ef1577f6caebe72018c3b2ad3e353f7
parentc2066fcb95d48eb3d8cddb7076c71a4f763b0349
realtek: fix ethtool stats for RTL839x and RTL930x

The MIB registers contain different stats depending on the SoC, and for
RTL930x some stats are in an additional register.

Create separate MIB descs for each SoC to implement this. Also make
reading 64-bit counters more robust, by protecting against an overflow
of the lower 32 bits during the read.

RTL931x remains unsupported, because it uses a table and thus requires
a separate implementation.

While we are at it, rename structs/functions to use the rtldsa prefix.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/18415
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c