提交 9db299c7 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: phy: Fix ioctl handler when modifing MII_ADVERTISE

When the MII_ADVERTISE register is modified by the IOCTL handler,
phydev->advertising needs recalculating. Use the _mod_ variant of
mii_adv_to_linkmode_adv_t so that bits outside of the advertise
registers are not cleared.

Fixes: c0ec3c27 ("net: phy: Convert u32 phydev->lp_advertising to linkmode")
Reported-by: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6dbd0090
......@@ -437,7 +437,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
}
break;
case MII_ADVERTISE:
mii_adv_to_linkmode_adv_t(phydev->advertising,
mii_adv_mod_linkmode_adv_t(phydev->advertising,
val);
change_autoneg = true;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册