Commit ed623fb8 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Jakub Kicinski
Browse files

net: phy: add phy_set_eee_broken



Add an accessor for eee_broken_modes, so that drivers
don't have to deal with phylib internals.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/0f8ee279-d40d-4489-a3b0-d993472d744a@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 721aa69e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1263,6 +1263,16 @@ void of_set_phy_eee_broken(struct phy_device *phydev);
void of_set_phy_timing_role(struct phy_device *phydev);
int phy_speed_down_core(struct phy_device *phydev);

/**
 * phy_set_eee_broken - Mark an EEE mode as broken so that it isn't advertised.
 * @phydev: The phy_device struct
 * @link_mode: The broken EEE mode
 */
static inline void phy_set_eee_broken(struct phy_device *phydev, u32 link_mode)
{
	linkmode_set_bit(link_mode, phydev->eee_broken_modes);
}

/**
 * phy_is_started - Convenience function to check whether PHY is started
 * @phydev: The phy_device struct