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-04-16 16:51:15 +0100
commit9246d6c69080a7547924edebd7aa870a0c8aa91c (patch)
tree16934827f309f5ab0c21e20164cd9f12f65493f7
parent02a537c4fcc953c144ff4c9d89b1729dfb17bc28 (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 b10c6f6f0f88..718c23126418 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -3656,9 +3656,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);
@@ -3689,6 +3686,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;