[openwrt/openwrt] realtek: pcs: add enum for port media
LEDE Commits
lede-commits at lists.infradead.org
Wed Jan 7 02:01:16 PST 2026
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b4bd85d504ef5f858e116b6f6b566621169fb094
commit b4bd85d504ef5f858e116b6f6b566621169fb094
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Sun Dec 21 13:14:04 2025 +0000
realtek: pcs: add enum for port media
The Realtek SDK includes a lot of code around specific port media,
usually having quite some differences between 10G fiber, 1G fiber and
DAC cables. For each type, several magic values are set which in the end
usually make different kinds of links work optimal.
While there is currently no way to get that media information from the
kernel, add some fields as an enum to have a notion of different media
kinds. In additional steps, code for the subtargets can be taken over
from the SDK to handle different media.
Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21385
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
.../linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c
index 9974955a3a..3ba29b0dc9 100644
--- a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c
+++ b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c
@@ -131,6 +131,18 @@ enum rtpcs_sds_mode {
RTPCS_SDS_MODE_USXGMII_2_5GSXGMII,
};
+enum rtpcs_port_media {
+ RTPCS_PORT_MEDIA_NONE,
+ RTPCS_PORT_MEDIA_FIBER_100M,
+ RTPCS_PORT_MEDIA_FIBER_1G,
+ RTPCS_PORT_MEDIA_FIBER_2_5G,
+ RTPCS_PORT_MEDIA_FIBER_10G,
+ RTPCS_PORT_MEDIA_DAC_50CM,
+ RTPCS_PORT_MEDIA_DAC_100CM,
+ RTPCS_PORT_MEDIA_DAC_300CM,
+ RTPCS_PORT_MEDIA_DAC_500CM,
+};
+
struct rtpcs_ctrl;
struct rtpcs_serdes {
More information about the lede-commits
mailing list