net/ice/base: support checking double VLAN mode
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 15 Dec 2020 04:21:21 +0000 (12:21 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:06 +0000 (16:03 +0100)
commit67285599c9f413c59118379d1f7162031ea6acdc
tree905ccb4c28138bd5b76e90cdc5b3283efafce9da
parentc7ff2213a5fe884d56adcd4a7b50ecd5810bebf2
net/ice/base: support checking double VLAN mode

If a driver wants to configure double VLAN mode (DVM) it needs to
first check if the DDP supports DVM. To do this the driver needs to read
the package metadata section via the upload section AQ (0x04C1).

If the DDP doesn't support configuring double VLAN mode (DVM), then
there is nothing to do regarding configuring the VLAN mode of the
device.

The set_svm() or set_dvm() ops should only be called if the current
configuration supports configuring the VLAN mode of the device.

Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_bitops.h
drivers/net/ice/base/ice_flex_pipe.c
drivers/net/ice/base/ice_flex_pipe.h
drivers/net/ice/base/ice_flex_type.h
drivers/net/ice/base/ice_vlan_mode.c