Kernel 6.1 has changed format of sfp_parse_support(), so lets adapt to
those changes so it works on newer kernels as well.
Signed-off-by: Robert Marko <robimarko@gmail.com>
__ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, };
phy_interface_t iface;
int ret;
__ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, };
phy_interface_t iface;
int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+ DECLARE_PHY_INTERFACE_MASK(interfaces);
+ sfp_parse_support(phydev->sfp_bus, id, support, interfaces);
+#else
sfp_parse_support(phydev->sfp_bus, id, support);
sfp_parse_support(phydev->sfp_bus, id, support);
iface = sfp_select_interface(phydev->sfp_bus, support);
dev_info(&phydev->mdio.dev, "%s SFP module inserted\n", phy_modes(iface));
iface = sfp_select_interface(phydev->sfp_bus, support);
dev_info(&phydev->mdio.dev, "%s SFP module inserted\n", phy_modes(iface));