提交 6dbd0090 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: mii: mii_lpa_mod_linkmode_lpa_t: Make use of linkmode_mod_bit helper

Replace the if else code structure with a call to the helper
linkmode_mod_bit.
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d3351931
......@@ -451,12 +451,8 @@ static inline void mii_lpa_mod_linkmode_lpa_t(unsigned long *lp_advertising,
{
mii_adv_mod_linkmode_adv_t(lp_advertising, lpa);
if (lpa & LPA_LPACK)
linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
lp_advertising);
else
linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
lp_advertising);
linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
lp_advertising, lpa & LPA_LPACK);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册