Commit e6084637 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by David S. Miller

net: phylink: rename phylink_sfp_config()

phylink_sfp_config() now only deals with configuring the MAC for a
SFP containing a PHY. Rename it to be specific.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f81fa96d
...@@ -2867,9 +2867,8 @@ static void phylink_sfp_set_config(struct phylink *pl, u8 mode, ...@@ -2867,9 +2867,8 @@ static void phylink_sfp_set_config(struct phylink *pl, u8 mode,
phylink_mac_initial_config(pl, false); phylink_mac_initial_config(pl, false);
} }
static int phylink_sfp_config(struct phylink *pl, u8 mode, static int phylink_sfp_config_phy(struct phylink *pl, u8 mode,
const unsigned long *supported, struct phy_device *phy)
const unsigned long *advertising)
{ {
__ETHTOOL_DECLARE_LINK_MODE_MASK(support1); __ETHTOOL_DECLARE_LINK_MODE_MASK(support1);
__ETHTOOL_DECLARE_LINK_MODE_MASK(support); __ETHTOOL_DECLARE_LINK_MODE_MASK(support);
...@@ -2877,10 +2876,10 @@ static int phylink_sfp_config(struct phylink *pl, u8 mode, ...@@ -2877,10 +2876,10 @@ static int phylink_sfp_config(struct phylink *pl, u8 mode,
phy_interface_t iface; phy_interface_t iface;
int ret; int ret;
linkmode_copy(support, supported); linkmode_copy(support, phy->supported);
memset(&config, 0, sizeof(config)); memset(&config, 0, sizeof(config));
linkmode_copy(config.advertising, advertising); linkmode_copy(config.advertising, phy->advertising);
config.interface = PHY_INTERFACE_MODE_NA; config.interface = PHY_INTERFACE_MODE_NA;
config.speed = SPEED_UNKNOWN; config.speed = SPEED_UNKNOWN;
config.duplex = DUPLEX_UNKNOWN; config.duplex = DUPLEX_UNKNOWN;
...@@ -3093,7 +3092,7 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy) ...@@ -3093,7 +3092,7 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy)
mode = MLO_AN_INBAND; mode = MLO_AN_INBAND;
/* Do the initial configuration */ /* Do the initial configuration */
ret = phylink_sfp_config(pl, mode, phy->supported, phy->advertising); ret = phylink_sfp_config_phy(pl, mode, phy);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment