net: phy: Add support for resolving 5G and 2.5G autoneg

Now that 2.5G and 5G can be represented in phydev->advertising and
phydev->lp_advertising, add these two links modes as possible
resolutions to auto negotiation.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn 2018-11-10 23:43:37 +01:00 committed by David S. Miller
parent 3c6b59d6f0
commit cb6402fe26

View File

@ -359,6 +359,14 @@ void phy_resolve_aneg_linkmode(struct phy_device *phydev)
if (linkmode_test_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT, common)) {
phydev->speed = SPEED_10000;
phydev->duplex = DUPLEX_FULL;
} else if (linkmode_test_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
common)) {
phydev->speed = SPEED_5000;
phydev->duplex = DUPLEX_FULL;
} else if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
common)) {
phydev->speed = SPEED_2500;
phydev->duplex = DUPLEX_FULL;
} else if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
common)) {
phydev->speed = SPEED_1000;