realtek: dsa: Refresh link_stats in .get_stats64
authorSven Eckelmann <[email protected]>
Mon, 3 Nov 2025 17:19:14 +0000 (18:19 +0100)
committerHauke Mehrtens <[email protected]>
Sat, 15 Nov 2025 23:10:56 +0000 (00:10 +0100)
commite76ed39f3b296562b1490a4793cff4cf4986649d
tree90c939045a3b67aa56150d0805bc36c0b9b69ac9
parentbd78eeb53f85a87f2a29218661a1a3f1d754fd40
realtek: dsa: Refresh link_stats in .get_stats64

If an architecture doesn't need to sleep for retrieving the current
statistics from the HW, it is possible to directly retrieve the last values
from the HW when .get_stats64 is called. This avoids the stale counters
with the current refresh interval of 60 seconds.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20631
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c