net: mtk_eth_soc: correct 802.3z speed setting
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 18 May 2022 14:54:47 +0000 (15:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 May 2022 01:14:29 +0000 (18:14 -0700)
commit7da3f901f8ecb425105fad39a0f5de73306abe52
treef1aa8f9c5f2a3913952bfd72ee36f1f6b9f0e99c
parentbc5e93e0cd22e360eda23859b939280205567580
net: mtk_eth_soc: correct 802.3z speed setting

Phylink does not guarantee that state->speed will be set correctly in
the mac_config() call, so it's a bug that the driver makes use of it.
Moreover, it is making use of it in a function that is only ever called
for 1000BASE-X and 2500BASE-X which operate at a fixed speed which
happens to be the same setting irrespective of the interface mode. We
can simply remove the switch statement and just set the SGMII interface
speed.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mediatek/mtk_sgmii.c