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 <jelonek.jonas@gmail.com>
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;
if (ret < 0)
return ret;
+ sds->media = sds_media;
+
ret = sds->ops->config_media(sds, sds_media, hw_mode);
if (ret < 0)
return ret;