ice: Fix Port VLAN priority bits
authorBrett Creeley <brett.creeley@intel.com>
Wed, 22 Jan 2020 15:21:27 +0000 (07:21 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 16 Feb 2020 00:34:02 +0000 (16:34 -0800)
commit61c9ce86a6f5c3c2eb1dad89da0c758f586ffc3f
tree8dbe388955c408ba12c6b10c8468fc17a264bb50
parent0b6c6a8bb6d541aad9e0f3bb2307316707aec723
ice: Fix Port VLAN priority bits

Currently when configuring a port VLAN for a VF we are only shifting the
QoS bits by 12. This is incorrect. Fix this by getting rid of the ICE
specific VLAN defines and use the kernel VLAN defines instead.

Also, don't assign a value to vlanprio until the VLAN ID and QoS
parameters have been validated.

Also, there are many places we do (le16_to_cpu(vsi->info.pvid) &
VLAN_VID_MASK). Instead do (vf->port_vlan_info & VLAN_VID_MASK) because
we always save what's stored in vsi->info.pvid to vf->port_vlan_info in
the CPU's endianness.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h