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)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 26 Jan 2021 23:38:51 +0000 (15:38 -0800)
commit156878d0e697187c7d207ee6c22afe50b7f3678c
treed6d542961ec1dd65cf2bcbf1198a8846261fde62
parent0aa128475d33d2d0095947eeab6b3e4d22dbd578
net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled

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>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c