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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Nov 2018 07:17:04 +0000 (08:17 +0100)
commit92a2f39fc374f47dbaa6d47fae10677620900bb0
tree42ff3a5016073371bc27755752c640a80995dc34
parent5351b859a6dd60787e78982ef5e1072704806b6d
net/mlx5e: Claim TC hw offloads support only under a proper build config

[ Upstream commit 077ecd785d90c6cbba08d719faa4be8561aa0a1e ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c