diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2020-03-09 09:36:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-09 20:13:16 -0700 |
commit | 422829f9f8dbe677d1f9edc0bf1fd679d3f10c25 (patch) | |
tree | 977e3e379ef4f4d3e40095b3c2ade2c1ce691538 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
parent | e0fa433db28a2f51696b0fc48994354478ed6628 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index cb7a5bad4cfe..cf184241b85e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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, |