]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net/mlx5e: Remove unnecessary checks when setting num channels
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 17 Jan 2017 17:19:19 +0000 (19:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jan 2017 19:58:24 +0000 (14:58 -0500)
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>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 33a399a8b5d52297379ade73f37e61df266905fa..b1b9eb6ee1354c3e099cafcb82d45d6cfe13ec86 100644 (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;