]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Jan 2025 10:44:19 +0000 (11:44 +0100)
commitfe55b1d401c697c2ef126fe3ebbcaa6885fced5a
treeff444ef09a754687d1efdc23bda1b66e8bfdda5e
parent6a46e3e87b5964f21eb90e8abfee916141df1763
ethtool: linkstate: migrate linkstate functions to support multi-PHY setups

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>
net/ethtool/linkstate.c