diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 87e57328a81b..7a692f80bda4 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -2119,10 +2119,11 @@ ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src, | |||
2119 | * ice_cfg_vlan_pruning - enable or disable VLAN pruning on the VSI | 2119 | * ice_cfg_vlan_pruning - enable or disable VLAN pruning on the VSI |
2120 | * @vsi: VSI to enable or disable VLAN pruning on | 2120 | * @vsi: VSI to enable or disable VLAN pruning on |
2121 | * @ena: set to true to enable VLAN pruning and false to disable it | 2121 | * @ena: set to true to enable VLAN pruning and false to disable it |
2122 | * @vlan_promisc: enable valid security flags if not in VLAN promiscuous mode | ||
2122 | * | 2123 | * |
2123 | * returns 0 if VSI is updated, negative otherwise | 2124 | * returns 0 if VSI is updated, negative otherwise |
2124 | */ | 2125 | */ |
2125 | int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena) | 2126 | int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena, bool vlan_promisc) |
2126 | { | 2127 | { |
2127 | struct ice_vsi_ctx *ctxt; | 2128 | struct ice_vsi_ctx *ctxt; |
2128 | struct device *dev; | 2129 | struct device *dev; |
@@ -2150,8 +2151,10 @@ int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena) | |||
2150 | ctxt->info.sw_flags2 &= ~ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA; | 2151 | ctxt->info.sw_flags2 &= ~ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA; |
2151 | } | 2152 | } |
2152 | 2153 | ||
2153 | ctxt->info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_SECURITY_VALID | | 2154 | if (!vlan_promisc) |
2154 | ICE_AQ_VSI_PROP_SW_VALID); | 2155 | ctxt->info.valid_sections = |
2156 | cpu_to_le16(ICE_AQ_VSI_PROP_SECURITY_VALID | | ||
2157 | ICE_AQ_VSI_PROP_SW_VALID); | ||
2155 | 2158 | ||
2156 | status = ice_update_vsi(&vsi->back->hw, vsi->idx, ctxt, NULL); | 2159 | status = ice_update_vsi(&vsi->back->hw, vsi->idx, ctxt, NULL); |
2157 | if (status) { | 2160 | if (status) { |