]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: fix use of state->speed
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 30 Jun 2020 10:04:40 +0000 (11:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jun 2020 20:01:12 +0000 (13:01 -0700)
commitbe2daa759f2d512ee1d654f4ed5167c1e2c1c86c
tree669b2c4dc492066c6eef5512844be5b211f0eb0f
parent4655166436fe3c308a74aff22f173ebfe8c0f139
net: mvneta: fix use of state->speed

When support for short preambles was added, it incorrectly keyed its
decision off state->speed instead of state->interface.  state->speed
is not guaranteed to be correct for in-band modes, which can lead to
short preambles being unexpectedly disabled.

Fix this by keying off the interface mode, which is the only way that
mvneta can operate at 2.5Gbps.

Fixes: cad86d4d1581 ("net: mvneta: Add support for 2500Mbps SGMII")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c