aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c
diff options
context:
space:
mode:
authorBrett Creeley <[email protected]>2021-12-02 16:38:41 +0000
committerTony Nguyen <[email protected]>2022-02-09 17:24:45 +0000
commitbc42afa954870985ca07dbb38c79eca1a5d81a39 (patch)
tree9560307326b0de3117995218c1ee3e79b194bc82 /drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c
parentice: Add helper function for adding VLAN 0 (diff)
downloadkernel-bc42afa954870985ca07dbb38c79eca1a5d81a39.tar.gz
kernel-bc42afa954870985ca07dbb38c79eca1a5d81a39.zip
ice: Add new VSI VLAN ops
Incoming changes to support 802.1Q and/or 802.1ad VLAN filtering and offloads require more flexibility when configuring VLANs. The VSI VLAN interface will allow flexibility for configuring VLANs for all VSI types. Add new files to separate the VSI VLAN ops and move functions to make the code more organized. Signed-off-by: Brett Creeley <[email protected]> Tested-by: Gurucharan G <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c b/drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c
new file mode 100644
index 000000000000..3bab6c025856
--- /dev/null
+++ b/drivers/net/ethernet/intel/ice/ice_vsi_vlan_ops.c
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (C) 2019-2021, Intel Corporation. */
+
+#include "ice_vsi_vlan_ops.h"
+#include "ice.h"
+
+void ice_vsi_init_vlan_ops(struct ice_vsi *vsi)
+{
+ vsi->vlan_ops.add_vlan = ice_vsi_add_vlan;
+ vsi->vlan_ops.del_vlan = ice_vsi_del_vlan;
+ vsi->vlan_ops.ena_stripping = ice_vsi_ena_stripping;
+ vsi->vlan_ops.dis_stripping = ice_vsi_dis_stripping;
+ vsi->vlan_ops.ena_insertion = ice_vsi_ena_insertion;
+ vsi->vlan_ops.dis_insertion = ice_vsi_dis_insertion;
+ vsi->vlan_ops.ena_rx_filtering = ice_vsi_ena_rx_vlan_filtering;
+ vsi->vlan_ops.dis_rx_filtering = ice_vsi_dis_rx_vlan_filtering;
+ vsi->vlan_ops.ena_tx_filtering = ice_vsi_ena_tx_vlan_filtering;
+ vsi->vlan_ops.dis_tx_filtering = ice_vsi_dis_tx_vlan_filtering;
+ vsi->vlan_ops.set_port_vlan = ice_vsi_set_port_vlan;
+}