diff options
Diffstat (limited to 'drivers/net/sfc/mcdi_phy.c')
-rw-r--r-- | drivers/net/sfc/mcdi_phy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sfc/mcdi_phy.c b/drivers/net/sfc/mcdi_phy.c index 1fcda2d82399..6c5fccbdeca2 100644 --- a/drivers/net/sfc/mcdi_phy.c +++ b/drivers/net/sfc/mcdi_phy.c | |||
@@ -545,7 +545,7 @@ static int efx_mcdi_phy_set_settings(struct efx_nic *efx, struct ethtool_cmd *ec | |||
545 | caps = (ethtool_to_mcdi_cap(ecmd->advertising) | | 545 | caps = (ethtool_to_mcdi_cap(ecmd->advertising) | |
546 | 1 << MC_CMD_PHY_CAP_AN_LBN); | 546 | 1 << MC_CMD_PHY_CAP_AN_LBN); |
547 | } else if (ecmd->duplex) { | 547 | } else if (ecmd->duplex) { |
548 | switch (ecmd->speed) { | 548 | switch (ethtool_cmd_speed(ecmd)) { |
549 | case 10: caps = 1 << MC_CMD_PHY_CAP_10FDX_LBN; break; | 549 | case 10: caps = 1 << MC_CMD_PHY_CAP_10FDX_LBN; break; |
550 | case 100: caps = 1 << MC_CMD_PHY_CAP_100FDX_LBN; break; | 550 | case 100: caps = 1 << MC_CMD_PHY_CAP_100FDX_LBN; break; |
551 | case 1000: caps = 1 << MC_CMD_PHY_CAP_1000FDX_LBN; break; | 551 | case 1000: caps = 1 << MC_CMD_PHY_CAP_1000FDX_LBN; break; |
@@ -553,7 +553,7 @@ static int efx_mcdi_phy_set_settings(struct efx_nic *efx, struct ethtool_cmd *ec | |||
553 | default: return -EINVAL; | 553 | default: return -EINVAL; |
554 | } | 554 | } |
555 | } else { | 555 | } else { |
556 | switch (ecmd->speed) { | 556 | switch (ethtool_cmd_speed(ecmd)) { |
557 | case 10: caps = 1 << MC_CMD_PHY_CAP_10HDX_LBN; break; | 557 | case 10: caps = 1 << MC_CMD_PHY_CAP_10HDX_LBN; break; |
558 | case 100: caps = 1 << MC_CMD_PHY_CAP_100HDX_LBN; break; | 558 | case 100: caps = 1 << MC_CMD_PHY_CAP_100HDX_LBN; break; |
559 | case 1000: caps = 1 << MC_CMD_PHY_CAP_1000HDX_LBN; break; | 559 | case 1000: caps = 1 << MC_CMD_PHY_CAP_1000HDX_LBN; break; |