Commit 725ea4bf authored by Russell King's avatar Russell King Committed by David S. Miller

net: phylink: update to use phy_support_asym_pause()

Use phy_support_asym_pause() rather than open-coding it.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50bef719
...@@ -713,11 +713,6 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy) ...@@ -713,11 +713,6 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy)
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported); __ETHTOOL_DECLARE_LINK_MODE_MASK(supported);
int ret; int ret;
memset(&config, 0, sizeof(config));
linkmode_copy(supported, phy->supported);
linkmode_copy(config.advertising, phy->advertising);
config.interface = pl->link_config.interface;
/* /*
* This is the new way of dealing with flow control for PHYs, * This is the new way of dealing with flow control for PHYs,
* as described by Timur Tabi in commit 529ed1275263 ("net: phy: * as described by Timur Tabi in commit 529ed1275263 ("net: phy:
...@@ -725,10 +720,12 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy) ...@@ -725,10 +720,12 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy)
* using our validate call to the MAC, we rely upon the MAC * using our validate call to the MAC, we rely upon the MAC
* clearing the bits from both supported and advertising fields. * clearing the bits from both supported and advertising fields.
*/ */
if (phylink_test(supported, Pause)) phy_support_asym_pause(phy);
phylink_set(config.advertising, Pause);
if (phylink_test(supported, Asym_Pause)) memset(&config, 0, sizeof(config));
phylink_set(config.advertising, Asym_Pause); linkmode_copy(supported, phy->supported);
linkmode_copy(config.advertising, phy->advertising);
config.interface = pl->link_config.interface;
ret = phylink_validate(pl, supported, &config); ret = phylink_validate(pl, supported, &config);
if (ret) if (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