Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f92c66f authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

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: default avatarJiri Pirko <jpirko@redhat.com>
Reviewed-by: default avatarNicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent afab2d29
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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: