aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-04-03 10:05:26 +0200
committerPetr Štetiar <ynezz@true.cz>2019-04-08 18:37:04 +0200
commit31ea08a64bd977e0dc0a65804e4103cb52d81cea (patch)
tree484a96d2c1987ed76767414667a95fe9b9cc5086 /target/linux/ar71xx/files
parent0f8cdc28af2619d412b4a8f594b77ac6e7d27edd (diff)
downloadupstream-31ea08a64bd977e0dc0a65804e4103cb52d81cea.tar.gz
upstream-31ea08a64bd977e0dc0a65804e4103cb52d81cea.tar.bz2
upstream-31ea08a64bd977e0dc0a65804e4103cb52d81cea.zip
ar71xx: ag71xx: Fix broken networking on some devices (FS#2177)
It was reported, that latest ar71xx builds have broken networking on TP-Link TL-WPA8630 and Nanostation M5 XW devices and that by reverting the offending commit, everything is back to normal. Fixes: d3506d1 ("ar71xx: ag71xx: fix compile error when enabling debug") Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
index e92798ceb8..336143f753 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
@@ -127,12 +127,13 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
if (ag->mii_bus->mdio_map[phy_addr] == NULL)
continue;
- phydev = mdiobus_get_phy(ag->mii_bus, phy_addr);
-
DBG("%s: PHY found at %s, uid=%08x\n",
dev_name(dev),
dev_name(&ag->mii_bus->mdio_map[phy_addr]->dev),
(phydev) ? phydev->phy_id : 0);
+
+ if (phydev == NULL)
+ phydev = mdiobus_get_phy(ag->mii_bus, phy_addr);
#endif
}