]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: enhance pcs_get_state() for RTL93xx 19575/head
authorHarshal Gohel <hg@simonwunderlich.de>
Mon, 14 Jul 2025 08:37:28 +0000 (10:37 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 7 Aug 2025 13:50:01 +0000 (15:50 +0200)
commit9ccfca33038ac27cedca6f6bb18f18c47a7e38d0
treebd0176016a06079917fc68b9013ea389ecfa3711
parent2645c4afbb0935ed91d38c961037465078078064
realtek: dsa: enhance pcs_get_state() for RTL93xx

Currently the SerDes driven SFP ports give strange ethtool readings
on RTL93xx devices. Especially duplex and speed are shown even if
no link is up and running. That leads to confusion because the MAC
reports arbitrary values.

Enhance the readout by refactoring the pcs_get_state() function.
Calculate speed/duplex/pause only if link is detected.

Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c