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 4f1c75fbff3..1e0bb6937f1 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); }