From: Jonas Jelonek Date: Sat, 27 Jun 2026 17:50:12 +0000 (+0000) Subject: realtek: pcs: store active media type in SerDes state X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dd1c280aec92e67caa07a9031cbcfa85c8cbcad;p=thirdparty%2Fopenwrt.git realtek: pcs: store active media type in SerDes state Track the resolved media type in struct rtpcs_serdes alongside hw_mode, storing it as soon as rtpcs_sds_select_media() resolves it so all subsequent ops (set_hw_mode, activate, post_config) can access it. This is unused for now and will be used only in dead code in next patches. Though, this dead code is going to be used with subsequent patches. Link: https://github.com/openwrt/openwrt/pull/23983 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c index 9f03e6bd5c8..49b93cdc21e 100644 --- a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c @@ -294,6 +294,7 @@ struct rtpcs_serdes { s16 link_port[RTPCS_MAX_LINKS_PER_SDS]; enum rtpcs_sds_mode hw_mode; + enum rtpcs_sds_media media; u8 id; u8 num_of_links; bool first_start; @@ -4011,6 +4012,8 @@ static int rtpcs_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode, if (ret < 0) return ret; + sds->media = sds_media; + ret = sds->ops->config_media(sds, sds_media, hw_mode); if (ret < 0) return ret;