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: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn 2018-12-05 21:49:44 +01:00 committed by David S. Miller
parent d3351931a3
commit 6dbd0090f9
1 changed files with 2 additions and 6 deletions

View File

@ -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); mii_adv_mod_linkmode_adv_t(lp_advertising, lpa);
if (lpa & LPA_LPACK) linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, lp_advertising, lpa & LPA_LPACK);
lp_advertising);
else
linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
lp_advertising);
} }
/** /**