]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/en_main.c
net/mlx5e: Fix setup TC ndo
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_main.c
index a61b71b6fff30358e43602b1f84e16c697e3140f..41cd22a223dccbd9dae460331525a1fc2414be9e 100644 (file)
@@ -2976,7 +2976,7 @@ static int mlx5e_setup_tc(struct net_device *netdev, u8 tc)
        new_channels.params = priv->channels.params;
        new_channels.params.num_tc = tc ? tc : 1;
 
-       if (test_bit(MLX5E_STATE_OPENED, &priv->state)) {
+       if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
                priv->channels.params = new_channels.params;
                goto out;
        }