diff options
| author | Jonas Jelonek | 2025-12-21 13:14:04 +0000 |
|---|---|---|
| committer | Robert Marko | 2026-01-07 10:01:11 +0000 |
| commit | b4bd85d504ef5f858e116b6f6b566621169fb094 (patch) | |
| tree | 96d8bf47c8f07df50e80cab6f76315c04c3a6e48 | |
| parent | b435b5bc61f5315fc6f4905dd39f02795d831ff4 (diff) | |
| download | openwrt-b4bd85d504ef5f858e116b6f6b566621169fb094.tar.gz | |
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21385
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 { |