From 2aa558c49a12c0820fd7b6cc55bf90b320ef3551 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 1 Oct 2020 17:02:47 +0200 Subject: target: remove obsolete kernel version switches for 4.19 This removes unneeded kernel version switches from the targets after kernel 4.19 has been dropped. Signed-off-by: Adrian Schmutzler --- target/linux/generic/files/drivers/net/phy/ar8216.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'target/linux/generic/files/drivers/net/phy/ar8216.c') diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 18a455b21a..0b0348bfdf 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -2496,10 +2496,7 @@ ar8xxx_phy_read_status(struct phy_device *phydev) struct switch_port_link link; /* check for switch port link changes */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) - if (phydev->state == PHY_CHANGELINK) -#endif - ar8xxx_check_link_states(priv); + ar8xxx_check_link_states(priv); if (phydev->mdio.addr != 0) return genphy_read_status(phydev); @@ -2639,22 +2636,12 @@ found: priv->use_count++; if (phydev->mdio.addr == 0) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) linkmode_zero(phydev->supported); if (ar8xxx_has_gige(priv)) linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, phydev->supported); else linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, phydev->supported); linkmode_copy(phydev->advertising, phydev->supported); -#else - if (ar8xxx_has_gige(priv)) { - phydev->supported = SUPPORTED_1000baseT_Full; - phydev->advertising = ADVERTISED_1000baseT_Full; - } else { - phydev->supported = SUPPORTED_100baseT_Full; - phydev->advertising = ADVERTISED_100baseT_Full; - } -#endif if (priv->chip->config_at_probe) { priv->phy = phydev; @@ -2665,14 +2652,9 @@ found: } } else { if (ar8xxx_has_gige(priv)) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) linkmode_zero(phydev->supported); linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, phydev->supported); linkmode_copy(phydev->advertising, phydev->supported); -#else - phydev->supported |= SUPPORTED_1000baseT_Full; - phydev->advertising |= ADVERTISED_1000baseT_Full; -#endif } if (priv->chip->phy_rgmii_set) priv->chip->phy_rgmii_set(priv, phydev); -- cgit v1.2.3