diff options
author | Maxime Chevallier <maxime.chevallier@bootlin.com> | 2025-03-07 20:36:00 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-03-18 11:03:11 +0300 |
commit | 8c8c4a87933dd924f9fb56dfd35bae7e8f30a4b5 (patch) | |
tree | eeb96748efc4c788bf51f90c803b3771c7ac55cd /drivers/net/phy/phy.c | |
parent | d8c838a57ce25c746c9882ffa427d8bb3f22b526 (diff) | |
download | linux-8c8c4a87933dd924f9fb56dfd35bae7e8f30a4b5.tar.xz |
net: phy: phy_caps: Move phy_speeds to phy_caps
Use the newly introduced link_capabilities array to derive the list of
possible speeds when given a combination of linkmodes. As
link_capabilities is indexed by speed, we don't have to iterate the
whole phy_settings array.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250307173611.129125-4-maxime.chevallier@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 16ffc00b419c..3128df03feda 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -37,6 +37,7 @@ #include <net/sock.h> #include "phylib-internal.h" +#include "phy-caps.h" #define PHY_STATE_TIME HZ @@ -245,7 +246,7 @@ unsigned int phy_supported_speeds(struct phy_device *phy, unsigned int *speeds, unsigned int size) { - return phy_speeds(speeds, size, phy->supported); + return phy_caps_speeds(speeds, size, phy->supported); } /** |