summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2016-08-09 08:11:45 +0200
committerJohn Crispin <john@phrozen.org>2016-08-10 03:04:08 +0200
commit7f2258007893ec02e6c520242bcfb7381787014a (patch)
tree60fa0788e910d31c33aa4f731d42b7189d6681ab /target/linux
parent2b1f4945b155ffee7f9c7f44bb90e5498b880ff5 (diff)
downloadmtk-20170518-7f2258007893ec02e6c520242bcfb7381787014a.zip
mtk-20170518-7f2258007893ec02e6c520242bcfb7381787014a.tar.gz
mtk-20170518-7f2258007893ec02e6c520242bcfb7381787014a.tar.bz2
kernel: adm6996: set carrier status
Due to the missing carrier status set, the interface wasn't usable on a BTHOMEHUB2B after ip link down and up as it is done in preinit. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/net/phy/adm6996.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/adm6996.c b/target/linux/generic/files/drivers/net/phy/adm6996.c
index a2ff2b0..2fe2ee7 100644
--- a/target/linux/generic/files/drivers/net/phy/adm6996.c
+++ b/target/linux/generic/files/drivers/net/phy/adm6996.c
@@ -1052,6 +1052,11 @@ static int adm6996_read_status(struct phy_device *phydev)
phydev->speed = SPEED_100;
phydev->duplex = DUPLEX_FULL;
phydev->link = 1;
+
+ phydev->state = PHY_RUNNING;
+ netif_carrier_on(phydev->attached_dev);
+ phydev->adjust_link(phydev->attached_dev);
+
return 0;
}