Subject: Re: [PATCH] ethtool v4: add autoneg advertise feature

From: Jeff Garzik <[email-masked]>
Date: Thu, 24 Aug 2006 02:26:50 -0400

[email-masked] wrote:
> @@ -598,25 +608,7 @@ static void parse_cmdline(int argc, char
>  		}
>  	}
>  
> -	if (autoneg_wanted == AUTONEG_ENABLE){
> -		if (speed_wanted == SPEED_10 && duplex_wanted == DUPLEX_HALF)
> -			advertising_wanted = ADVERTISED_10baseT_Half;
> -		else if (speed_wanted == SPEED_10 &&
> -			 duplex_wanted == DUPLEX_FULL)
> -			advertising_wanted = ADVERTISED_10baseT_Full;
> -		else if (speed_wanted == SPEED_100 &&
> -			 duplex_wanted == DUPLEX_HALF)
> -			advertising_wanted = ADVERTISED_100baseT_Half;
> -		else if (speed_wanted == SPEED_100 &&
> -			 duplex_wanted == DUPLEX_FULL)
> -			advertising_wanted = ADVERTISED_100baseT_Full;
> -		else if (speed_wanted == SPEED_1000 &&
> -			 duplex_wanted == DUPLEX_HALF)
> -			advertising_wanted = ADVERTISED_1000baseT_Half;
> -		else if (speed_wanted == SPEED_1000 &&
> -			 duplex_wanted == DUPLEX_FULL)
> -			advertising_wanted = ADVERTISED_1000baseT_Full;
> -		else
> +	if ((autoneg_wanted == AUTONEG_ENABLE) && (advertising_wanted < 0)) {

This will change existing behavior of the tool, AFAICS.

	Jeff