net: phylink: actually fix ksettings_set() ethtool call
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 1 Jun 2023 09:12:06 +0000 (10:12 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Jun 2023 06:49:56 +0000 (23:49 -0700)
commit03c44a21d0333a2f469680bc9caaf96a9bfaea87
treed05ec13be971756df41a60617f1d4d8444b185d3
parent3696e140c25f5a2af763505aff99d14c0661cede
net: phylink: actually fix ksettings_set() ethtool call

Raju Lakkaraju reported that the below commit caused a regression
with Lan743x drivers and a 2.5G SFP. Sadly, this is because the commit
was utterly wrong. Let's fix this properly by not moving the
linkmode_and(), but instead copying the link ksettings and then
modifying the advertising mask before passing the modified link
ksettings to phylib.

Fixes: df0acdc59b09 ("net: phylink: fix ksettings_set() ethtool call")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1q4eLm-00Ayxk-GZ@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c