Skip to content

Commit ed623fb

Browse files
hkallweitkuba-moo
authored andcommitted
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: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/0f8ee279-d40d-4489-a3b0-d993472d744a@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 721aa69 commit ed623fb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/linux/phy.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,16 @@ void of_set_phy_eee_broken(struct phy_device *phydev);
12631263
void of_set_phy_timing_role(struct phy_device *phydev);
12641264
int phy_speed_down_core(struct phy_device *phydev);
12651265

1266+
/**
1267+
* phy_set_eee_broken - Mark an EEE mode as broken so that it isn't advertised.
1268+
* @phydev: The phy_device struct
1269+
* @link_mode: The broken EEE mode
1270+
*/
1271+
static inline void phy_set_eee_broken(struct phy_device *phydev, u32 link_mode)
1272+
{
1273+
linkmode_set_bit(link_mode, phydev->eee_broken_modes);
1274+
}
1275+
12661276
/**
12671277
* phy_is_started - Convenience function to check whether PHY is started
12681278
* @phydev: The phy_device struct

0 commit comments

Comments
 (0)