diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 82d4244c6e1050a416dfe2a939ca7c15d095a125..9c12b35232af5dd801494d59095b39454d8e536f 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, if ((hw->phy.media_type == ixgbe_media_type_copper) || (hw->phy.multispeed_fiber)) { - /* 10000/copper and 1000/copper must autoneg - * this function does not support any duplex forcing, but can - * limit the advertising of the adapter to only 10000 or 1000 */ + /* + * this function does not support duplex forcing, but can + * limit the advertising of the adapter to the specified speed + */ if (ecmd->autoneg == AUTONEG_DISABLE) return -EINVAL; + if (ecmd->advertising & ~ecmd->supported) + return -EINVAL; + old = hw->phy.autoneg_advertised; advertised = 0; if (ecmd->advertising & ADVERTISED_10000baseT_Full)