diff options
author | Robert Marko <robimarko@gmail.com> | 2023-08-14 18:42:18 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-09-17 21:00:23 +0200 |
commit | 3d6d8bcd8fd13bc72a4670f9f209528f9b6d1a93 (patch) | |
tree | 30d8d524ebcc4d99c99b5320d85815a0caffc871 /target/linux/ipq40xx | |
parent | bd242a42a6142c4c7c5cf69ac836a31276e86155 (diff) | |
download | openwrt-3d6d8bcd8fd13bc72a4670f9f209528f9b6d1a93.tar.gz openwrt-3d6d8bcd8fd13bc72a4670f9f209528f9b6d1a93.tar.bz2 openwrt-3d6d8bcd8fd13bc72a4670f9f209528f9b6d1a93.zip |
ipq40xx: qca807x: adapt for 6.1
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>
Diffstat (limited to 'target/linux/ipq40xx')
-rw-r--r-- | target/linux/ipq40xx/files/drivers/net/phy/qca807x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c b/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c index 23b0ca74f7..abfc11e121 100644 --- a/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c +++ b/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c @@ -644,8 +644,13 @@ static int qca807x_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) __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); +#endif iface = sfp_select_interface(phydev->sfp_bus, support); dev_info(&phydev->mdio.dev, "%s SFP module inserted\n", phy_modes(iface)); |