aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-09-11 19:53:15 -0400
committerDavid S. Miller <davem@davemloft.net>2018-09-12 23:24:21 -0400
commitaf8d9bb2f2f405ad541794b46f9d7bc70f13e5cb (patch)
tree1da441f208e3228e6888456e78a7b972889ccc6d /drivers/net/phy
parent41124fa64d4b298b82266b7ddbefc43540b77b44 (diff)
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/phy')
-rw-r--r--drivers/net/phy/phy_device.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e9ca83a438b0..a0646a66f005 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1783,6 +1783,19 @@ void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode)
1783} 1783}
1784EXPORT_SYMBOL(phy_remove_link_mode); 1784EXPORT_SYMBOL(phy_remove_link_mode);
1785 1785
1786/**
1787 * phy_support_asym_pause - Enable support of asym pause
1788 * @phydev: target phy_device struct
1789 *
1790 * Description: Called by the MAC to indicate is supports Asym Pause.
1791 */
1792void phy_support_asym_pause(struct phy_device *phydev)
1793{
1794 phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
1795 phydev->advertising = phydev->supported;
1796}
1797EXPORT_SYMBOL(phy_support_asym_pause);
1798
1786static void of_set_phy_supported(struct phy_device *phydev) 1799static void of_set_phy_supported(struct phy_device *phydev)
1787{ 1800{
1788 struct device_node *node = phydev->mdio.dev.of_node; 1801 struct device_node *node = phydev->mdio.dev.of_node;