net: mvpp2: fix the phylink mode validation
authorAntoine Tenart <antoine.tenart@bootlin.com>
Wed, 19 Dec 2018 17:00:12 +0000 (18:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 00:38:35 +0000 (16:38 -0800)
commit1b451fb2051b464b9758c09a3492104403252e2b
tree187236ce0f32116cb693bbc15cbfde71d94347d8
parent599d2570b2da7c2f5419332b42b7999d79c85959
net: mvpp2: fix the phylink mode validation

The mvpp2_phylink_validate() sets all modes that are supported by a
given PPv2 port. An mistake made the 10000baseT_Full mode being
advertised in some cases when a port wasn't configured to perform at
10G. This patch fixes this.

Fixes: d97c9f4ab000 ("net: mvpp2: 1000baseX support")
Reported-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c