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

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
...@@ -554,16 +554,6 @@ static int mlx5e_set_channels(struct net_device *dev, ...@@ -554,16 +554,6 @@ static int mlx5e_set_channels(struct net_device *dev,
__func__); __func__);
return -EINVAL; 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) if (priv->params.num_channels == count)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment