diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2026-03-27 11:43:33 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-03-31 03:36:44 +0300 |
| commit | 673416fb5b410b536f45e738ac34e482efd94e81 (patch) | |
| tree | 15e8dd3be9fb80deeeab62db5f79e0999c28bfcc | |
| parent | c3dd3b1e76e0ff20ce97e99bc8d1f3152eb177b9 (diff) | |
| download | linux-673416fb5b410b536f45e738ac34e482efd94e81.tar.xz | |
net: stmmac: qcom-ethqos: pass ethqos to ethqos_pcs_set_inband()
Rather than getting the stmmac_priv pointer in
ethqos_configure_sgmii(), move it into ethqos_pcs_set_inband() and pass
the struct qcom_ethqos pointer instead.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Link: https://patch.msgid.link/E1w62mz-0000000E3Bx-1Xd8@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 502f2b184a87..b9cfcf32cebc 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -590,8 +590,11 @@ static void ethqos_configure_rgmii(struct qcom_ethqos *ethqos, ethqos_rgmii_macro_init(ethqos, speed); } -static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable) +static void ethqos_pcs_set_inband(struct qcom_ethqos *ethqos, bool enable) { + struct net_device *dev = platform_get_drvdata(ethqos->pdev); + struct stmmac_priv *priv = netdev_priv(dev); + stmmac_pcs_ctrl_ane(priv, enable, 0); } @@ -601,9 +604,6 @@ static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable) static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos, phy_interface_t interface, int speed) { - struct net_device *dev = platform_get_drvdata(ethqos->pdev); - struct stmmac_priv *priv = netdev_priv(dev); - switch (speed) { case SPEED_2500: case SPEED_1000: @@ -620,7 +620,7 @@ static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos, break; } - ethqos_pcs_set_inband(priv, interface == PHY_INTERFACE_MODE_SGMII); + ethqos_pcs_set_inband(ethqos, interface == PHY_INTERFACE_MODE_SGMII); } static void ethqos_fix_mac_speed(void *priv, phy_interface_t interface, |
