diff options
-rw-r--r-- | drivers/net/phy/phylink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index b885a33c9152..c1a31f0cea61 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -3580,9 +3580,6 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) */ phy_support_asym_pause(phy); - if (phylink_phy_no_inband(phy)) - pl->sfp_link_an_mode = MLO_AN_PHY; - /* Set the PHY's host supported interfaces */ phy_interface_and(phy->host_interfaces, phylink_sfp_interfaces, pl->config->supported_interfaces); @@ -3613,6 +3610,9 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) phylink_dbg(pl, "copper SFP: chosen %s interface\n", phy_modes(interface)); + if (phylink_phy_no_inband(phy)) + pl->sfp_link_an_mode = MLO_AN_PHY; + if (pl->cur_link_an_mode != pl->sfp_link_an_mode || pl->link_config.interface != interface) { pl->link_config.interface = interface; |