diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-06-01 06:36:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-02 17:43:56 -0400 |
commit | 6f92c66f7190b1677ea666249b72298723392115 (patch) | |
tree | e2ad3c8f3f146011396d77360fdcea32846ceb8c /drivers/net/bonding | |
parent | afab2d2999e9c12cf319e1f19da9a0a754560d80 (diff) |
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 <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 17b4dd94da90..716c852a6968 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -629,15 +629,8 @@ static int bond_update_speed_duplex(struct slave *slave) | |||
629 | return -1; | 629 | return -1; |
630 | 630 | ||
631 | slave_speed = ethtool_cmd_speed(&etool); | 631 | slave_speed = ethtool_cmd_speed(&etool); |
632 | switch (slave_speed) { | 632 | if (slave_speed == 0 || slave_speed == ((__u32) -1)) |
633 | case SPEED_10: | ||
634 | case SPEED_100: | ||
635 | case SPEED_1000: | ||
636 | case SPEED_10000: | ||
637 | break; | ||
638 | default: | ||
639 | return -1; | 633 | return -1; |
640 | } | ||
641 | 634 | ||
642 | switch (etool.duplex) { | 635 | switch (etool.duplex) { |
643 | case DUPLEX_FULL: | 636 | case DUPLEX_FULL: |