aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 82d4244c6e10..9c12b35232af 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -324,12 +324,16 @@ static int ixgbe_set_settings(struct net_device *netdev,
324 324
325 if ((hw->phy.media_type == ixgbe_media_type_copper) || 325 if ((hw->phy.media_type == ixgbe_media_type_copper) ||
326 (hw->phy.multispeed_fiber)) { 326 (hw->phy.multispeed_fiber)) {
327 /* 10000/copper and 1000/copper must autoneg 327 /*
328 * this function does not support any duplex forcing, but can 328 * this function does not support duplex forcing, but can
329 * limit the advertising of the adapter to only 10000 or 1000 */ 329 * limit the advertising of the adapter to the specified speed
330 */
330 if (ecmd->autoneg == AUTONEG_DISABLE) 331 if (ecmd->autoneg == AUTONEG_DISABLE)
331 return -EINVAL; 332 return -EINVAL;
332 333
334 if (ecmd->advertising & ~ecmd->supported)
335 return -EINVAL;
336
333 old = hw->phy.autoneg_advertised; 337 old = hw->phy.autoneg_advertised;
334 advertised = 0; 338 advertised = 0;
335 if (ecmd->advertising & ADVERTISED_10000baseT_Full) 339 if (ecmd->advertising & ADVERTISED_10000baseT_Full)