net/mlx5e: Claim TC hw offloads support only under a proper build config
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 18 Oct 2018 10:31:27 +0000 (12:31 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 19 Nov 2018 22:35:04 +0000 (14:35 -0800)
commit077ecd785d90c6cbba08d719faa4be8561aa0a1e
tree11eb9998a150669df528f4a24282c35b827491b5
parentd3a80bb5a3eac311ddf28387402593977574460d
net/mlx5e: Claim TC hw offloads support only under a proper build config

Currently, we are only supporting tc hw offloads when the eswitch
support is compiled in, but we are not gating the adevertizment
of the NETIF_F_HW_TC feature on this config being set.

Fix it, and while doing that, also avoid dealing with the feature
on ethtool when the config is not set.

Fixes: e8f887ac6a45 ('net/mlx5e: Introduce tc offload support')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c