net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off
authorMaor Dickman <maord@nvidia.com>
Thu, 4 Aug 2022 12:28:42 +0000 (15:28 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 22 Aug 2022 19:57:09 +0000 (12:57 -0700)
commit550f96432e6f6770efdaee0e65239d61431062a1
treef938a3e97674ef398b11093e8c333e7388a1b964
parentf7a4e867f48c2e03ab6a237c06ab923d80aeeeb1
net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off

The cited commit reintroduced the ability to set hw-tc-offload
in switchdev mode by reusing NIC mode calls without modifying it
to support both modes, this can cause an illegal memory access
when trying to turn hw-tc-offload off.

Fix this by using the right TC_FLAG when checking if tc rules
are installed while disabling hw-tc-offload.

Fixes: d3cbd4254df8 ("net/mlx5e: Add ndo_set_feature for uplink representor")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c