Commit 765c22aa authored by Luo Jie's avatar Luo Jie Committed by David S. Miller

net: phy: add qca8081 get_features

Reuse the at803x phy driver get_features excepting
adding 2500M capability.
Signed-off-by: default avatarLuo Jie <luoj@codeaurora.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 79c7bc05
...@@ -744,6 +744,15 @@ static int at803x_get_features(struct phy_device *phydev) ...@@ -744,6 +744,15 @@ static int at803x_get_features(struct phy_device *phydev)
if (err) if (err)
return err; return err;
if (phydev->drv->phy_id == QCA8081_PHY_ID) {
err = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_NG_EXTABLE);
if (err < 0)
return err;
linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported,
err & MDIO_PMA_NG_EXTABLE_2_5GBT);
}
if (phydev->drv->phy_id != ATH8031_PHY_ID) if (phydev->drv->phy_id != ATH8031_PHY_ID)
return 0; return 0;
...@@ -1653,6 +1662,7 @@ static struct phy_driver at803x_driver[] = { ...@@ -1653,6 +1662,7 @@ static struct phy_driver at803x_driver[] = {
.set_tunable = at803x_set_tunable, .set_tunable = at803x_set_tunable,
.set_wol = at803x_set_wol, .set_wol = at803x_set_wol,
.get_wol = at803x_get_wol, .get_wol = at803x_get_wol,
.get_features = at803x_get_features,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.read_status = qca808x_read_status, .read_status = qca808x_read_status,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment