]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: phy: phy_caps: Implement link_capabilities lookup by linkmode
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 7 Mar 2025 17:36:03 +0000 (18:36 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Mar 2025 08:03:11 +0000 (09:03 +0100)
commitdbcd85b05c5ba520b75dbf51d0b48b5a366b6c68
tree0c31e9701aac53fc7b6f04c8262d66c8838a2dd5
parent87b22ce312350170af5e970c5abfb2bb87e39964
net: phy: phy_caps: Implement link_capabilities lookup by linkmode

In several occasions, phylib needs to lookup a set of matching speed and
duplex against a given linkmode set. Instead of relying on the
phy_settings array and thus iterate over the whole linkmodes list, use
the link_capabilities array to lookup these matches, as we aren't
interested in the actual link setting that matches but rather the speed
and duplex for that setting.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250307173611.129125-7-maxime.chevallier@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/phy-caps.h
drivers/net/phy/phy-core.c
drivers/net/phy/phy_caps.c