bnxt_en: Fix VLAN acceleration handling in bnxt_fix_features().
authorMichael Chan <michael.chan@broadcom.com>
Sun, 26 Apr 2020 20:24:42 +0000 (16:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:15:26 +0000 (08:15 +0200)
commitb081b91e6626f62fde4bd314d55d1c7201a5c1b4
treecc308ab7685411d38f3a949e273c13bd97fc1b41
parent019495fa4e5bbdeecb087a37417f9bad10da5f41
bnxt_en: Fix VLAN acceleration handling in bnxt_fix_features().

[ Upstream commit c72cb303aa6c2ae7e4184f0081c6d11bf03fb96b ]

The current logic in bnxt_fix_features() will inadvertently turn on both
CTAG and STAG VLAN offload if the user tries to disable both.  Fix it
by checking that the user is trying to enable CTAG or STAG before
enabling both.  The logic is supposed to enable or disable both CTAG and
STAG together.

Fixes: 5a9f6b238e59 ("bnxt_en: Enable and disable RX CTAG and RX STAG VLAN acceleration together.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c