diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-11-07 14:43:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-08 18:02:05 -0500 |
commit | 3b01ea72f34cf8e18d16d993bb20f3cd241e4e52 (patch) | |
tree | 7302b2d8d599bf37cfb2d9aca17af3326f3836c1 /drivers/net/phy/phy.c | |
parent | 5867b330140518ad73507f0be98d89636b91bf5f (diff) |
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 <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 11 |
1 files changed, 0 insertions, 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) | |||
970 | break; | 970 | break; |
971 | 971 | ||
972 | if (phydev->link) { | 972 | if (phydev->link) { |
973 | if (AUTONEG_ENABLE == phydev->autoneg) { | ||
974 | err = phy_aneg_done(phydev); | ||
975 | if (err < 0) | ||
976 | break; | ||
977 | |||
978 | if (!err) { | ||
979 | phydev->state = PHY_AN; | ||
980 | phydev->link_timeout = PHY_AN_TIMEOUT; | ||
981 | break; | ||
982 | } | ||
983 | } | ||
984 | phydev->state = PHY_RUNNING; | 973 | phydev->state = PHY_RUNNING; |
985 | phy_link_up(phydev); | 974 | phy_link_up(phydev); |
986 | } | 975 | } |