net: phy: marvell10g: Use get_features to get the PHY abilities
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 22 Feb 2019 23:37:38 +0000 (00:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 01:45:25 +0000 (17:45 -0800)
commit7414542406cd3806bac8ec7d50b63969cb98b37f
treee2240eec814058ad543c1bcaf0339da97659bb37
parentc1164bb1a631205a28b9dd8d4a9331a689e85561
net: phy: marvell10g: Use get_features to get the PHY abilities

The Alaska family of 10G PHYs has more abilities than the ones listed in
PHY_10GBIT_FULL_FEATURES, the exact list depending on the model.

Make use of the newly introduced .get_features call to build this list,
using genphy_c45_pma_read_abilities to build the list of supported
linkmodes, and adding autoneg ability based on what's reported by the AN
MMD.

.config_init is still used to validate the interface_mode.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell10g.c