From 3b01ea72f34cf8e18d16d993bb20f3cd241e4e52 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Wed, 7 Nov 2018 20:43:20 +0100 Subject: [PATCH] net: phy: remove useless check in state machine case PHY_NOLINK If aneg is enabled and the PHY reports the link as up then definitely aneg finished successfully. Therefore this check is useless and can be removed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- drivers/net/phy/phy.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 476578746d91..87c6d304cbc8 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -970,17 +970,6 @@ void phy_state_machine(struct work_struct *work) break; if (phydev->link) { - if (AUTONEG_ENABLE == phydev->autoneg) { - err = phy_aneg_done(phydev); - if (err < 0) - break; - - if (!err) { - phydev->state = PHY_AN; - phydev->link_timeout = PHY_AN_TIMEOUT; - break; - } - } phydev->state = PHY_RUNNING; phy_link_up(phydev); } -- 2.30.2