1
1

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>
This commit is contained in:
Jonas Jelonek 2025-12-21 13:14:04 +00:00 committed by Robert Marko
parent b435b5bc61
commit b4bd85d504

View File

@ -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 {