diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-09-12 02:53:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-13 06:24:21 +0300 |
commit | af8d9bb2f2f405ad541794b46f9d7bc70f13e5cb (patch) | |
tree | 1da441f208e3228e6888456e78a7b972889ccc6d /drivers/net/ethernet/mediatek/mtk_eth_soc.c | |
parent | 41124fa64d4b298b82266b7ddbefc43540b77b44 (diff) | |
download | linux-af8d9bb2f2f405ad541794b46f9d7bc70f13e5cb.tar.xz |
net: ethernet: Add helper for MACs which support asym pause
Rather than have the MAC drivers manipulate phydev members to indicate
they support Asym Pause, add a helper function.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek/mtk_eth_soc.c')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index db231bda7c2a..cc1e9a96a43b 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -355,12 +355,8 @@ static int mtk_phy_connect(struct net_device *dev) dev->phydev->speed = 0; dev->phydev->duplex = 0; - if (of_phy_is_fixed_link(mac->of_node)) - dev->phydev->supported |= - SUPPORTED_Pause | SUPPORTED_Asym_Pause; - phy_set_max_speed(dev->phydev, SPEED_1000); - dev->phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; + phy_support_asym_pause(dev->phydev); dev->phydev->advertising = dev->phydev->supported | ADVERTISED_Autoneg; phy_start_aneg(dev->phydev); |