]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ethtool: linkstate: migrate linkstate functions to support multi-PHY setups
authorOleksij Rempel <o.rempel@pengutronix.de>
Fri, 10 Jan 2025 06:05:11 +0000 (07:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:02:07 +0000 (13:02 +0100)
commitb71cd95764ad964fec295a31c299b0f71799264f
tree68475cff7033f5df8210801bbf09a17af4e11e2e
parent8aa8a40c766b3945b40565a70349d5581458ff63
ethtool: linkstate: migrate linkstate functions to support multi-PHY setups

[ Upstream commit fe55b1d401c697c2ef126fe3ebbcaa6885fced5a ]

Adapt linkstate_get_sqi() and linkstate_get_sqi_max() to take a
phy_device argument directly, enabling support for setups with
multiple PHYs. The previous assumption of a single PHY attached to
a net_device no longer holds.

Use ethnl_req_get_phydev() to identify the appropriate PHY device
for the operation. Update linkstate_prepare_data() and related
logic to accommodate this change, ensuring compatibility with
multi-PHY configurations.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 637399bf7e77 ("net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ethtool/linkstate.c