summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@intel.com>2021-12-02 08:38:44 -0800
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-02-09 09:24:45 -0800
commit2bfefa2dab6bb4c8596778e3ccb011d1f0e13975 (patch)
tree2975995264997e51a4b7f37dc681b1ec5a02fc90 /drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
parenta19d7f7f012233aadef4fce5845f5d5737685ade (diff)
ice: Use the proto argument for VLAN ops
Currently the proto argument is unused. This is because the driver only supports 802.1Q VLAN filtering. This policy is enforced via netdev features that the driver sets up when configuring the netdev, so the proto argument won't ever be anything other than 802.1Q. However, this will allow for future iterations of the driver to seemlessly support 802.1ad filtering. Begin using the proto argument and extend the related structures to support its use. Signed-off-by: Brett Creeley <brett.creeley@intel.com> Tested-by: Gurucharan G <gurucharanx.g@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index a36a80b64455..ce168307f005 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -4140,7 +4140,7 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,
mutex_lock(&vf->cfg_lock);
- vf->port_vlan_info = ICE_VLAN(vlan_id, qos);
+ vf->port_vlan_info = ICE_VLAN(ETH_P_8021Q, vlan_id, qos);
if (ice_vf_is_port_vlan_ena(vf))
dev_info(dev, "Setting VLAN %u, QoS %u on VF %d\n",
vlan_id, qos, vf_id);
@@ -4261,7 +4261,7 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)
if (!vid)
continue;
- vlan = ICE_VLAN(vid, 0);
+ vlan = ICE_VLAN(ETH_P_8021Q, vid, 0);
status = vsi->vlan_ops.add_vlan(vsi, &vlan);
if (status) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
@@ -4314,7 +4314,7 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)
if (!vid)
continue;
- vlan = ICE_VLAN(vid, 0);
+ vlan = ICE_VLAN(ETH_P_8021Q, vid, 0);
status = vsi->vlan_ops.del_vlan(vsi, &vlan);
if (status) {
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
@@ -4393,7 +4393,7 @@ static int ice_vc_ena_vlan_stripping(struct ice_vf *vf)
}
vsi = ice_get_vf_vsi(vf);
- if (vsi->vlan_ops.ena_stripping(vsi))
+ if (vsi->vlan_ops.ena_stripping(vsi, ETH_P_8021Q))
v_ret = VIRTCHNL_STATUS_ERR_PARAM;
error_param:
@@ -4458,7 +4458,7 @@ static int ice_vf_init_vlan_stripping(struct ice_vf *vf)
return 0;
if (ice_vf_vlan_offload_ena(vf->driver_caps))
- return vsi->vlan_ops.ena_stripping(vsi);
+ return vsi->vlan_ops.ena_stripping(vsi, ETH_P_8021Q);
else
return vsi->vlan_ops.dis_stripping(vsi);
}