|
@@ -2128,11 +2128,15 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
|
|
|
|
|
|
/* Check for condition where there was already a port VLAN ID
|
|
|
* filter set and now it is being deleted by setting it to zero.
|
|
|
+ * Additionally check for the condition where there was a port
|
|
|
+ * VLAN but now there is a new and different port VLAN being set.
|
|
|
* Before deleting all the old VLAN filters we must add new ones
|
|
|
* with -1 (I40E_VLAN_ANY) or otherwise we're left with all our
|
|
|
* MAC addresses deleted.
|
|
|
*/
|
|
|
- if (!(vlan_id || qos) && vsi->info.pvid)
|
|
|
+ if ((!(vlan_id || qos) ||
|
|
|
+ (vlan_id | qos) != le16_to_cpu(vsi->info.pvid)) &&
|
|
|
+ vsi->info.pvid)
|
|
|
ret = i40e_vsi_add_vlan(vsi, I40E_VLAN_ANY);
|
|
|
|
|
|
if (vsi->info.pvid) {
|