[PATCH net-next v2 2/8] net: phy: add is_smart_eee_phy variable for SmartEEE support

Oleksij Rempel posted 8 patches 2 years, 10 months ago
[PATCH net-next v2 2/8] net: phy: add is_smart_eee_phy variable for SmartEEE support
Posted by Oleksij Rempel 2 years, 10 months ago
This commit introduces a new variable, is_smart_eee_phy, to the PHY
layer. This variable is used to indicate whether a PHY supports the
SmartEEE functionality, which is a Low Power Idle (LPI) implementation
on the PHY side, typically handled by the MAC.

By adding the is_smart_eee_phy variable, PHY drivers and the PHYlib
framework can provide proper configuration depending on the side that
implements LPI (PHY or MAC).

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 include/linux/phy.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 07cebf110aa6..6622b59ab5a1 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -547,6 +547,7 @@ struct macsec_ops;
  * @downshifted_rate: Set true if link speed has been downshifted.
  * @is_on_sfp_module: Set true if PHY is located on an SFP module.
  * @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY
+ * @is_smart_eee_phy: Set true if PHY is a Smart EEE PHY
  * @state: State of the PHY for management purposes
  * @dev_flags: Device-specific flags used by the PHY driver.
  *
@@ -642,6 +643,7 @@ struct phy_device {
 	unsigned downshifted_rate:1;
 	unsigned is_on_sfp_module:1;
 	unsigned mac_managed_pm:1;
+	unsigned is_smart_eee_phy:1;
 
 	unsigned autoneg:1;
 	/* The most recently read link state */
-- 
2.30.2