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: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eran Ben Elisha 2017-01-17 19:19:19 +02:00 committed by David S. Miller
parent e91ef71dfe
commit 639e9e9416

View File

@ -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;