Commit 422829f9 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller

net: stmmac: Switch to linkmode_and()/linkmode_andnot()

Use the linkmode_and()/linkmode_andnot() helpers to simplify the code.
Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0fa433d
...@@ -858,14 +858,11 @@ static void stmmac_validate(struct phylink_config *config, ...@@ -858,14 +858,11 @@ static void stmmac_validate(struct phylink_config *config,
phylink_set(mask, 1000baseT_Half); phylink_set(mask, 1000baseT_Half);
} }
bitmap_and(supported, supported, mac_supported, linkmode_and(supported, supported, mac_supported);
__ETHTOOL_LINK_MODE_MASK_NBITS); linkmode_andnot(supported, supported, mask);
bitmap_andnot(supported, supported, mask,
__ETHTOOL_LINK_MODE_MASK_NBITS); linkmode_and(state->advertising, state->advertising, mac_supported);
bitmap_and(state->advertising, state->advertising, mac_supported, linkmode_andnot(state->advertising, state->advertising, mask);
__ETHTOOL_LINK_MODE_MASK_NBITS);
bitmap_andnot(state->advertising, state->advertising, mask,
__ETHTOOL_LINK_MODE_MASK_NBITS);
} }
static void stmmac_mac_pcs_get_state(struct phylink_config *config, static void stmmac_mac_pcs_get_state(struct phylink_config *config,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment