提交 a83c8829 编写于 作者: R Russell King 提交者: David S. Miller

net: phylink: use config.an_enabled in ksettings_set method

Rather than recomputing whether AN is enabled, use config.an_enabled.
Suggested-by: NIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cbc1bb1e
......@@ -1400,8 +1400,7 @@ int phylink_ethtool_ksettings_set(struct phylink *pl,
pl->link_config.interface = config.interface;
pl->link_config.speed = config.speed;
pl->link_config.duplex = config.duplex;
pl->link_config.an_enabled = kset->base.autoneg !=
AUTONEG_DISABLE;
pl->link_config.an_enabled = config.an_enabled;
if (pl->cur_link_an_mode == MLO_AN_INBAND &&
!test_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册