From: Sergey Ryazanov Date: Tue, 6 Jun 2017 22:25:32 +0000 (+0300) Subject: ip17xx: correct aneg_done return value X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2cc61e6e8e951b1480a024fdb66bc539aa163bbc;p=openwrt%2Fstaging%2Frobimarko.git ip17xx: correct aneg_done return value PHY core treats any positive return value as the auto-negotiation done indication. Since we do not actually check any device register in this callback then update it to return positive value with a neutral meaning instead of the register flag to avoid confusing for future readers. Signed-off-by: Sergey Ryazanov --- diff --git a/target/linux/generic/files/drivers/net/phy/ip17xx.c b/target/linux/generic/files/drivers/net/phy/ip17xx.c index 9eedfd4d28..85a9617a5d 100644 --- a/target/linux/generic/files/drivers/net/phy/ip17xx.c +++ b/target/linux/generic/files/drivers/net/phy/ip17xx.c @@ -1334,7 +1334,7 @@ static int ip17xx_config_aneg(struct phy_device *pdev) static int ip17xx_aneg_done(struct phy_device *pdev) { - return BMSR_ANEGCOMPLETE; + return 1; /* Return any positive value */ } static int ip17xx_update_link(struct phy_device *pdev)