net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled
authorMaor Dickman <maord@nvidia.com>
Sun, 24 Jan 2021 15:21:25 +0000 (17:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:49 +0000 (23:28 +0100)
commitbf1864854ab24c207008c64431e738dc07a1f6c1
tree3b16684461262a0c786c2763c53b34f0348abd32
parent1a06120d6ff292e2ed09bc1867737fd566fbc3d9
net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled

[ Upstream commit 156878d0e697187c7d207ee6c22afe50b7f3678c ]

The cited commit introduce new CONFIG_MLX5_CLS_ACT kconfig variable
to control compilation of TC hardware offloads implementation.
When this configuration is disabled the driver is still wrongly
reports in ethtool that hw-tc-offload is supported.

Fixed by reporting hw-tc-offload is supported only when
CONFIG_MLX5_CLS_ACT is enabled.

Fixes: d956873f908c ("net/mlx5e: Introduce kconfig var for TC support")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c