diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-01-22 10:58:52 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-04-04 14:29:05 +0100 |
commit | 5ca48a8c13b3f8531d4b7407574c825cd70eecec (patch) | |
tree | cda932e19559c69aeaba7dfdb8519fcd23af8c3f /drivers/net/phy/phylink.c | |
parent | ea219c543e8dac95012cab247e9e4a662df968ef (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>
Diffstat (limited to 'drivers/net/phy/phylink.c')
-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 b00a315de060..74693307dfbf 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); |