summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-02-08 12:44:26 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-02-27 15:38:04 +0000
commit84b1678518ccafdb53b7ccf86e3d05a739718cd5 (patch)
tree5d22eff78ef9802d69570dba34b959fea7254eb8
parent211b76abc17e89741de9cfa679c24a93103ac52a (diff)
net: phylink: move phylink_phy_no_inband()
Since the BCM84881 driver always provides phy->supported_interfaces, and the driver is required for this PHY, move phylink_phy_no_inband() to the case where this is non-empty. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/phy/phylink.c6
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;