summaryrefslogtreecommitdiff
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-02-15 13:47:52 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-02-15 13:47:52 +0000
commitb3b79365f3d244392e4fa43118f1b6063a2182ac (patch)
treee175baf25716ddccd5036e56e608c48e19df7502 /target/linux/ramips
parent3e7b461431b83c9acda0922e204c1c3434c1eda3 (diff)
downloadmtk-20170518-b3b79365f3d244392e4fa43118f1b6063a2182ac.zip
mtk-20170518-b3b79365f3d244392e4fa43118f1b6063a2182ac.tar.gz
mtk-20170518-b3b79365f3d244392e4fa43118f1b6063a2182ac.tar.bz2
ramips: raeth: force link down in ramips_phy_stop
SVN-Revision: 30550
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/files/drivers/net/ramips.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c
index 9f76779..6fa1151 100644
--- a/target/linux/ramips/files/drivers/net/ramips.c
+++ b/target/linux/ramips/files/drivers/net/ramips.c
@@ -424,14 +424,13 @@ ramips_phy_stop(struct raeth_priv *re)
{
unsigned long flags;
- if (re->phy_dev) {
+ if (re->phy_dev)
phy_stop(re->phy_dev);
- } else {
- spin_lock_irqsave(&re->phy_lock, flags);
- re->link = 0;
- ramips_link_adjust(re);
- spin_unlock_irqrestore(&re->phy_lock, flags);
- }
+
+ spin_lock_irqsave(&re->phy_lock, flags);
+ re->link = 0;
+ ramips_link_adjust(re);
+ spin_unlock_irqrestore(&re->phy_lock, flags);
}
#else
static inline int