aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2018-08-12 12:57:52 +0800
committerMathias Kresin <dev@kresin.me>2018-08-13 08:37:19 +0200
commit42b3fdf9812f799c07bd30899a2bb2cff7d1a200 (patch)
tree8b8fe03eff96d19c1e673ec3fe30f226e81e36d1
parent4dc7cb792a8e34b6ad97c7b8058c70311a06bd38 (diff)
downloadupstream-42b3fdf9812f799c07bd30899a2bb2cff7d1a200.tar.gz
upstream-42b3fdf9812f799c07bd30899a2bb2cff7d1a200.tar.bz2
upstream-42b3fdf9812f799c07bd30899a2bb2cff7d1a200.zip
ath79: ag71xx: fix speed applied to MII0/1_CTRL on ar71xx/ar913x
Currently speed value is applied to interface mode field. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 4f1c75fbff..1e0bb6937f 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -552,8 +552,8 @@ static void ath79_mii_ctrl_set_speed(struct ag71xx *ag)
}
t = __raw_readl(ag->mii_base);
- t &= ~(AR71XX_MII_CTRL_IF_MASK);
- t |= (mii_speed & AR71XX_MII_CTRL_IF_MASK);
+ t &= ~(AR71XX_MII_CTRL_SPEED_MASK << AR71XX_MII_CTRL_SPEED_SHIFT);
+ t |= mii_speed << AR71XX_MII_CTRL_SPEED_SHIFT;
__raw_writel(t, ag->mii_base);
}