Skip to content

Commit 2d9ce64

Browse files
ericwouddavem330
authored andcommitted
net: phy: realtek: add rtl822x_c45_get_features() to set supported port
Sets ETHTOOL_LINK_MODE_TP_BIT in phydev->supported. Signed-off-by: Eric Woudstra <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2e4ea70 commit 2d9ce64

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/phy/realtek.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,14 @@ static int rtl822xb_read_status(struct phy_device *phydev)
843843
return 0;
844844
}
845845

846+
static int rtl822x_c45_get_features(struct phy_device *phydev)
847+
{
848+
linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT,
849+
phydev->supported);
850+
851+
return genphy_c45_pma_read_abilities(phydev);
852+
}
853+
846854
static int rtl822x_c45_config_aneg(struct phy_device *phydev)
847855
{
848856
bool changed = false;
@@ -1272,6 +1280,7 @@ static struct phy_driver realtek_drvs[] = {
12721280
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
12731281
.config_init = rtl822xb_config_init,
12741282
.get_rate_matching = rtl822xb_get_rate_matching,
1283+
.get_features = rtl822x_c45_get_features,
12751284
.config_aneg = rtl822x_c45_config_aneg,
12761285
.read_status = rtl822xb_c45_read_status,
12771286
.suspend = genphy_c45_pma_suspend,
@@ -1293,6 +1302,7 @@ static struct phy_driver realtek_drvs[] = {
12931302
.name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
12941303
.config_init = rtl822xb_config_init,
12951304
.get_rate_matching = rtl822xb_get_rate_matching,
1305+
.get_features = rtl822x_c45_get_features,
12961306
.config_aneg = rtl822x_c45_config_aneg,
12971307
.read_status = rtl822xb_c45_read_status,
12981308
.suspend = genphy_c45_pma_suspend,

0 commit comments

Comments
 (0)