aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
index 40f4a19b1ce1..be69c1d7941a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
80 mlx5_query_port_tun_entropy(mdev, &entropy_flags); 80 mlx5_query_port_tun_entropy(mdev, &entropy_flags);
81 tun_entropy->num_enabling_entries = 0; 81 tun_entropy->num_enabling_entries = 0;
82 tun_entropy->num_disabling_entries = 0; 82 tun_entropy->num_disabling_entries = 0;
83 tun_entropy->enabled = entropy_flags.calc_enabled; 83 tun_entropy->enabled = entropy_flags.calc_supported ?
84 tun_entropy->enabled = 84 entropy_flags.calc_enabled : true;
85 (entropy_flags.calc_supported) ?
86 entropy_flags.calc_enabled : true;
87} 85}
88 86
89static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy, 87static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,