From: Jonas Jelonek Date: Tue, 16 Dec 2025 16:51:22 +0000 (+0000) Subject: realtek: phy: 6.18: switch to sfp module caps X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=370a84eff2e8db677130c968b038fc8f25d31b81;p=thirdparty%2Fopenwrt.git realtek: phy: 6.18: switch to sfp module caps Kernel 6.18 uses dedicated sfp_module_caps instead of a plain bitmask for supported modes. Switch to that the fix the rtl83xx-phy driver. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/21181 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/files-6.18/drivers/net/phy/realtek/realtek_multiport.c b/target/linux/realtek/files-6.18/drivers/net/phy/realtek/realtek_multiport.c index 3074e578584..bc9066726ec 100644 --- a/target/linux/realtek/files-6.18/drivers/net/phy/realtek/realtek_multiport.c +++ b/target/linux/realtek/files-6.18/drivers/net/phy/realtek/realtek_multiport.c @@ -397,13 +397,12 @@ static int rtl8214fc_write_mmd(struct phy_device *phydev, int devnum, u16 regnum static int rtl8214fc_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) { - __ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, }; - DECLARE_PHY_INTERFACE_MASK(interfaces); struct phy_device *phydev = upstream; + const struct sfp_module_caps *caps; phy_interface_t iface; - sfp_parse_support(phydev->sfp_bus, id, support, interfaces); - iface = sfp_select_interface(phydev->sfp_bus, support); + caps = sfp_get_module_caps(phydev->sfp_bus); + iface = sfp_select_interface(phydev->sfp_bus, caps->link_modes); phydev_info(phydev, "%s SFP module inserted\n", phy_modes(iface));