]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcccc01a9d650f7536606fa88040e488edfc41f50
treef1aa8f9c5f2a3913952bfd72ee36f1f6b9f0e99c
parent9786c40e7c0e798827afd9d491ae17e529bde173
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