提交 99d0f3a1 编写于 作者: R Russell King (Oracle) 提交者: Jakub Kicinski

net: dpaa2-mac: use Autoneg bit rather than an_enabled

The Autoneg bit in the advertising bitmap and state->an_enabled are
always identical. Thus, we will be removing state->an_enabled.

Use the Autoneg bit in the advertising bitmap to indicate whether
autonegotiation should be used, rather than using the an_enabled
member which will be going away. This means we use the same condition
as phylink_mii_c22_pcs_config().
Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: NSimon Horman <simon.horman@corigine.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 1cc6571f
...@@ -159,7 +159,8 @@ static void dpaa2_mac_config(struct phylink_config *config, unsigned int mode, ...@@ -159,7 +159,8 @@ static void dpaa2_mac_config(struct phylink_config *config, unsigned int mode,
struct dpmac_link_state *dpmac_state = &mac->state; struct dpmac_link_state *dpmac_state = &mac->state;
int err; int err;
if (state->an_enabled) if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
state->advertising))
dpmac_state->options |= DPMAC_LINK_OPT_AUTONEG; dpmac_state->options |= DPMAC_LINK_OPT_AUTONEG;
else else
dpmac_state->options &= ~DPMAC_LINK_OPT_AUTONEG; dpmac_state->options &= ~DPMAC_LINK_OPT_AUTONEG;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册