Skip to content

Commit 6f92c66

Browse files
Jiri Pirkodavem330
authored andcommitted
bonding: allow all slave speeds
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 <[email protected]> Reviewed-by: Nicolas de Pesloüan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent afab2d2 commit 6f92c66

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,15 +629,8 @@ static int bond_update_speed_duplex(struct slave *slave)
629629
return -1;
630630

631631
slave_speed = ethtool_cmd_speed(&etool);
632-
switch (slave_speed) {
633-
case SPEED_10:
634-
case SPEED_100:
635-
case SPEED_1000:
636-
case SPEED_10000:
637-
break;
638-
default:
632+
if (slave_speed == 0 || slave_speed == ((__u32) -1))
639633
return -1;
640-
}
641634

642635
switch (etool.duplex) {
643636
case DUPLEX_FULL:

0 commit comments

Comments
 (0)