Skip to content

Commit

Permalink
bonding: allow all slave speeds
Browse files Browse the repository at this point in the history
No need to check for 10, 100, 1000, 10000 explicitly. Just make this
generic and check for invalid values only (similar check is in ethtool
userspace app). This enables correct speed handling for slave devices
with "nonstandard" speeds.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 2, 2011
1 parent afab2d2 commit 6f92c66
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,8 @@ static int bond_update_speed_duplex(struct slave *slave)
return -1;

slave_speed = ethtool_cmd_speed(&etool);
switch (slave_speed) {
case SPEED_10:
case SPEED_100:
case SPEED_1000:
case SPEED_10000:
break;
default:
if (slave_speed == 0 || slave_speed == ((__u32) -1))
return -1;
}

switch (etool.duplex) {
case DUPLEX_FULL:
Expand Down

0 comments on commit 6f92c66

Please sign in to comment.