net/bnxt: fix setting conflicting VLAN bits
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Sat, 29 Jul 2017 20:54:09 +0000 (15:54 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 31 Jul 2017 17:58:41 +0000 (19:58 +0200)
commitc037fc87324e900574c044cd2f19950c68019b56
tree09163bed50d8f404591cd55ca76869a67ce8e438
parent035a8cf88f010c82de3040c895c801ce0849b065
net/bnxt: fix setting conflicting VLAN bits

Only set the vlanonly bit if vlan_nonvlan is clear. Also, allow the
VLAN table to be cleared when vlanonly is set.

Clearing the VLAN table when vlanonly is set will stop all traffic
since it requires all frames to have a VLAN tag, and that tag to be
in the zero-length table. This is still a valid use case though,
and has been seen in the wild.

Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c