1 From c65f134dbf5eb38e71a94aba8656983221bdb46e Mon Sep 17 00:00:00 2001 2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> 3 Date: Fri, 17 Jun 2022 17:07:38 +0100 4 Subject: [PATCH net-next 04/12] net: phylink: rename phylink_sfp_config() 5 MIME-Version: 1.0 6 Content-Type: text/plain; charset=UTF-8 7 Content-Transfer-Encoding: 8bit 8 9 phylink_sfp_config() now only deals with configuring the MAC for a 10 SFP containing a PHY. Rename it to be specific. 11 12 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> 13 Signed-off-by: Marek BehĂșn <kabel@kernel.org> 14 --- 15 drivers/net/phy/phylink.c | 11 +++++------ 16 1 file changed, 5 insertions(+), 6 deletions(-) 17 18 diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c 19 index ab32ef767d69..f6e9231f0cbe 100644 20 --- a/drivers/net/phy/phylink.c 21 +++ b/drivers/net/phy/phylink.c 22 @@ -2867,9 +2867,8 @@ static void phylink_sfp_set_config(struct phylink *pl, u8 mode, 23 phylink_mac_initial_config(pl, false); 24 } 25 26 -static int phylink_sfp_config(struct phylink *pl, u8 mode, 27 - const unsigned long *supported, 28 - const unsigned long *advertising) 29 +static int phylink_sfp_config_phy(struct phylink *pl, u8 mode, 30 + struct phy_device *phy) 31 { 32 __ETHTOOL_DECLARE_LINK_MODE_MASK(support1); 33 __ETHTOOL_DECLARE_LINK_MODE_MASK(support); 34 @@ -2877,10 +2876,10 @@ static int phylink_sfp_config(struct phylink *pl, u8 mode, 35 phy_interface_t iface; 36 int ret; 37 38 - linkmode_copy(support, supported); 39 + linkmode_copy(support, phy->supported); 40 41 memset(&config, 0, sizeof(config)); 42 - linkmode_copy(config.advertising, advertising); 43 + linkmode_copy(config.advertising, phy->advertising); 44 config.interface = PHY_INTERFACE_MODE_NA; 45 config.speed = SPEED_UNKNOWN; 46 config.duplex = DUPLEX_UNKNOWN; 47 @@ -3093,7 +3092,7 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) 48 mode = MLO_AN_INBAND; 49 50 /* Do the initial configuration */ 51 - ret = phylink_sfp_config(pl, mode, phy->supported, phy->advertising); 52 + ret = phylink_sfp_config_phy(pl, mode, phy); 53 if (ret < 0) 54 return ret; 55 56 -- 57 2.35.1 58