diff options
Diffstat (limited to 'drivers/net/atl1e/atl1e_ethtool.c')
-rw-r--r-- | drivers/net/atl1e/atl1e_ethtool.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/atl1e/atl1e_ethtool.c b/drivers/net/atl1e/atl1e_ethtool.c index 6943a6c3b948..6269438d365f 100644 --- a/drivers/net/atl1e/atl1e_ethtool.c +++ b/drivers/net/atl1e/atl1e_ethtool.c | |||
@@ -51,13 +51,13 @@ static int atl1e_get_settings(struct net_device *netdev, | |||
51 | ecmd->transceiver = XCVR_INTERNAL; | 51 | ecmd->transceiver = XCVR_INTERNAL; |
52 | 52 | ||
53 | if (adapter->link_speed != SPEED_0) { | 53 | if (adapter->link_speed != SPEED_0) { |
54 | ecmd->speed = adapter->link_speed; | 54 | ethtool_cmd_speed_set(ecmd, adapter->link_speed); |
55 | if (adapter->link_duplex == FULL_DUPLEX) | 55 | if (adapter->link_duplex == FULL_DUPLEX) |
56 | ecmd->duplex = DUPLEX_FULL; | 56 | ecmd->duplex = DUPLEX_FULL; |
57 | else | 57 | else |
58 | ecmd->duplex = DUPLEX_HALF; | 58 | ecmd->duplex = DUPLEX_HALF; |
59 | } else { | 59 | } else { |
60 | ecmd->speed = -1; | 60 | ethtool_cmd_speed_set(ecmd, -1); |
61 | ecmd->duplex = -1; | 61 | ecmd->duplex = -1; |
62 | } | 62 | } |
63 | 63 | ||
@@ -95,18 +95,18 @@ static int atl1e_set_settings(struct net_device *netdev, | |||
95 | ecmd->advertising = hw->autoneg_advertised | | 95 | ecmd->advertising = hw->autoneg_advertised | |
96 | ADVERTISED_TP | ADVERTISED_Autoneg; | 96 | ADVERTISED_TP | ADVERTISED_Autoneg; |
97 | 97 | ||
98 | adv4 = hw->mii_autoneg_adv_reg & ~MII_AR_SPEED_MASK; | 98 | adv4 = hw->mii_autoneg_adv_reg & ~ADVERTISE_ALL; |
99 | adv9 = hw->mii_1000t_ctrl_reg & ~MII_AT001_CR_1000T_SPEED_MASK; | 99 | adv9 = hw->mii_1000t_ctrl_reg & ~MII_AT001_CR_1000T_SPEED_MASK; |
100 | if (hw->autoneg_advertised & ADVERTISE_10_HALF) | 100 | if (hw->autoneg_advertised & ADVERTISE_10_HALF) |
101 | adv4 |= MII_AR_10T_HD_CAPS; | 101 | adv4 |= ADVERTISE_10HALF; |
102 | if (hw->autoneg_advertised & ADVERTISE_10_FULL) | 102 | if (hw->autoneg_advertised & ADVERTISE_10_FULL) |
103 | adv4 |= MII_AR_10T_FD_CAPS; | 103 | adv4 |= ADVERTISE_10FULL; |
104 | if (hw->autoneg_advertised & ADVERTISE_100_HALF) | 104 | if (hw->autoneg_advertised & ADVERTISE_100_HALF) |
105 | adv4 |= MII_AR_100TX_HD_CAPS; | 105 | adv4 |= ADVERTISE_100HALF; |
106 | if (hw->autoneg_advertised & ADVERTISE_100_FULL) | 106 | if (hw->autoneg_advertised & ADVERTISE_100_FULL) |
107 | adv4 |= MII_AR_100TX_FD_CAPS; | 107 | adv4 |= ADVERTISE_100FULL; |
108 | if (hw->autoneg_advertised & ADVERTISE_1000_FULL) | 108 | if (hw->autoneg_advertised & ADVERTISE_1000_FULL) |
109 | adv9 |= MII_AT001_CR_1000T_FD_CAPS; | 109 | adv9 |= ADVERTISE_1000FULL; |
110 | 110 | ||
111 | if (adv4 != hw->mii_autoneg_adv_reg || | 111 | if (adv4 != hw->mii_autoneg_adv_reg || |
112 | adv9 != hw->mii_1000t_ctrl_reg) { | 112 | adv9 != hw->mii_1000t_ctrl_reg) { |
@@ -382,9 +382,6 @@ static const struct ethtool_ops atl1e_ethtool_ops = { | |||
382 | .get_eeprom_len = atl1e_get_eeprom_len, | 382 | .get_eeprom_len = atl1e_get_eeprom_len, |
383 | .get_eeprom = atl1e_get_eeprom, | 383 | .get_eeprom = atl1e_get_eeprom, |
384 | .set_eeprom = atl1e_set_eeprom, | 384 | .set_eeprom = atl1e_set_eeprom, |
385 | .set_tx_csum = ethtool_op_set_tx_hw_csum, | ||
386 | .set_sg = ethtool_op_set_sg, | ||
387 | .set_tso = ethtool_op_set_tso, | ||
388 | }; | 385 | }; |
389 | 386 | ||
390 | void atl1e_set_ethtool_ops(struct net_device *netdev) | 387 | void atl1e_set_ethtool_ops(struct net_device *netdev) |