1 From 09d7d8395ec61fba4392b35baa6f71c4e36489df Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Fri, 8 Nov 2019 15:18:02 +0000
4 Subject: [PATCH 637/660] net: phylink: update to use phy_support_asym_pause()
6 Use phy_support_asym_pause() rather than open-coding it.
8 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
10 drivers/net/phy/phylink.c | 17 +++++++----------
11 1 file changed, 7 insertions(+), 10 deletions(-)
13 --- a/drivers/net/phy/phylink.c
14 +++ b/drivers/net/phy/phylink.c
15 @@ -678,12 +678,6 @@ static int phylink_bringup_phy(struct ph
19 - memset(&config, 0, sizeof(config));
20 - ethtool_convert_legacy_u32_to_link_mode(supported, phy->supported);
21 - ethtool_convert_legacy_u32_to_link_mode(config.advertising,
23 - config.interface = pl->link_config.interface;
26 * This is the new way of dealing with flow control for PHYs,
27 * as described by Timur Tabi in commit 529ed1275263 ("net: phy:
28 @@ -691,10 +685,13 @@ static int phylink_bringup_phy(struct ph
29 * using our validate call to the MAC, we rely upon the MAC
30 * clearing the bits from both supported and advertising fields.
32 - if (phylink_test(supported, Pause))
33 - phylink_set(config.advertising, Pause);
34 - if (phylink_test(supported, Asym_Pause))
35 - phylink_set(config.advertising, Asym_Pause);
36 + phy_support_asym_pause(phy);
38 + memset(&config, 0, sizeof(config));
39 + ethtool_convert_legacy_u32_to_link_mode(supported, phy->supported);
40 + ethtool_convert_legacy_u32_to_link_mode(config.advertising,
42 + config.interface = pl->link_config.interface;
44 ret = phylink_validate(pl, supported, &config);