Skip to content

Commit c1fc14c

Browse files
Justin LaiPaolo Abeni
authored andcommitted
rtase: Correct the speed for RTL907XD-V1
Previously, the reported speed was uniformly set to SPEED_5000, but the RTL907XD-V1 actually operates at a speed of SPEED_10000. Therefore, this patch makes the necessary correction. Fixes: dd7f17c ("rtase: Implement ethtool function") Signed-off-by: Justin Lai <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent a1f8609 commit c1fc14c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/net/ethernet/realtek/rtase/rtase_main.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,10 +1714,21 @@ static int rtase_get_settings(struct net_device *dev,
17141714
struct ethtool_link_ksettings *cmd)
17151715
{
17161716
u32 supported = SUPPORTED_MII | SUPPORTED_Pause | SUPPORTED_Asym_Pause;
1717+
const struct rtase_private *tp = netdev_priv(dev);
17171718

17181719
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
17191720
supported);
1720-
cmd->base.speed = SPEED_5000;
1721+
1722+
switch (tp->hw_ver) {
1723+
case RTASE_HW_VER_906X_7XA:
1724+
case RTASE_HW_VER_906X_7XC:
1725+
cmd->base.speed = SPEED_5000;
1726+
break;
1727+
case RTASE_HW_VER_907XD_V1:
1728+
cmd->base.speed = SPEED_10000;
1729+
break;
1730+
}
1731+
17211732
cmd->base.duplex = DUPLEX_FULL;
17221733
cmd->base.port = PORT_MII;
17231734
cmd->base.autoneg = AUTONEG_DISABLE;

0 commit comments

Comments
 (0)