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

Commit 639e9e94 authored by Eran Ben Elisha's avatar Eran Ben Elisha Committed by David S. Miller
Browse files

net/mlx5e: Remove unnecessary checks when setting num channels



Boundaries checks for the number of RX and TX should be checked by the
caller and not in the driver.

Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e91ef71d
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -554,16 +554,6 @@ static int mlx5e_set_channels(struct net_device *dev,
			    __func__);
		return -EINVAL;
	}
	if (ch->rx_count || ch->tx_count) {
		netdev_info(dev, "%s: separate rx/tx count not supported\n",
			    __func__);
		return -EINVAL;
	}
	if (count > ncv) {
		netdev_info(dev, "%s: count (%d) > max (%d)\n",
			    __func__, count, ncv);
		return -EINVAL;
	}

	if (priv->params.num_channels == count)
		return 0;