提交 639e9e94 编写于 作者: E Eran Ben Elisha 提交者: 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: NEran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册