mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-13 18:06:21 +07:00
net: stmmac: Switch to linkmode_and()/linkmode_andnot()
Use the linkmode_and()/linkmode_andnot() helpers to simplify the code. Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e0fa433db2
commit
422829f9f8
@ -858,14 +858,11 @@ static void stmmac_validate(struct phylink_config *config,
|
||||
phylink_set(mask, 1000baseT_Half);
|
||||
}
|
||||
|
||||
bitmap_and(supported, supported, mac_supported,
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
||||
bitmap_andnot(supported, supported, mask,
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
||||
bitmap_and(state->advertising, state->advertising, mac_supported,
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
||||
bitmap_andnot(state->advertising, state->advertising, mask,
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS);
|
||||
linkmode_and(supported, supported, mac_supported);
|
||||
linkmode_andnot(supported, supported, mask);
|
||||
|
||||
linkmode_and(state->advertising, state->advertising, mac_supported);
|
||||
linkmode_andnot(state->advertising, state->advertising, mask);
|
||||
}
|
||||
|
||||
static void stmmac_mac_pcs_get_state(struct phylink_config *config,
|
||||
|
Loading…
Reference in New Issue
Block a user