On 8/23/06, Jeff Garzik <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] 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.
That is kinda the point. The current beahvior only allows the user to set the autonegotiation advertisement to one setting (i.e 100 Half or 100 Full or 10 Half or 10 Full). With this patch the user is now able to determine exactly speed's and duplex's will be advertised for example, if a user is connected to a hub, they can tell the nic to only advertise 100 half and 10 half. The old way of setting autonegotiation was using the following command: ethtool -s ethx speed 100 duplex full auto on now the command would be ethtool -s ethx auto on advertise 0x08 both commands would result in only advertising 100 FULL. There still needs to be a change made to the man file to reflect the change in the behavior of ethtool, which I have not done. But this patch will allow for greater flexibility in setting autonegotiation speeds. -- Cheers, Jeff - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
