i40e: don't allow i40e_vsi_(add|kill)_vlan to operate when VID<1
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 7 Dec 2016 22:05:34 +0000 (14:05 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 Feb 2017 06:36:38 +0000 (22:36 -0800)
commitf94484b7584765eebded5d7bfdeb0b2c7b1caf51
tree2e0a03f3a6b1f150aafaec2ccad8d38109a54f2b
parent8fe809a992639b2013c0d8da2ba55cdea28a959a
i40e: don't allow i40e_vsi_(add|kill)_vlan to operate when VID<1

Now that we have the separate i40e_(add|rm)_vlan_all_mac functions, we
should not be using the i40e_vsi_kill_vlan or i40e_vsi_add_vlan
functions when PVID is set or when VID is less than 1. This allows us to
remove some checks in i40e_vsi_add_vlan and ensures that callers which
need to handle VID=0 or VID=-1 don't accidentally invoke the VLAN mode
handling used to convert filters when entering VLAN mode. We also update
the functions to take u16 instead of s16 as well since they no longer
expect to be called with VID=I40E_VLAN_ANY.

Change-ID: Ibddf44a8bb840dde8ceef2a4fdb92fd953b05a57
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c