diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-02-10 10:36:44 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-12 18:20:04 -0800 |
| commit | 2001d21592e5eb531d23950223eedad55c987db8 (patch) | |
| tree | 42a6d05ac0f56abd158273cedf7d4ded68f82da5 /drivers | |
| parent | 2f4720318d02b3879e858e373826aa0b63a55e5a (diff) | |
net: phylink: provide phylink_mac_implements_lpi()
Provide a helper to determine whether the MAC operations structure
implements the LPI operations, which will be used by both phylink and
DSA.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1thR9g-003vX6-4s@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/phy/phylink.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 214b62fba991..6fbb5fd5b400 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1957,8 +1957,7 @@ struct phylink *phylink_create(struct phylink_config *config, return ERR_PTR(-EINVAL); } - pl->mac_supports_eee_ops = mac_ops->mac_disable_tx_lpi && - mac_ops->mac_enable_tx_lpi; + pl->mac_supports_eee_ops = phylink_mac_implements_lpi(mac_ops); pl->mac_supports_eee = pl->mac_supports_eee_ops && pl->config->lpi_capabilities && !phy_interface_empty(pl->config->lpi_interfaces); |
