]> Pileus Git - ~andy/linux/blobdiff - drivers/net/ethernet/intel/i40e/i40e_main.c
i40e: Retain MAC filters on port VLAN deletion
[~andy/linux] / drivers / net / ethernet / intel / i40e / i40e_main.c
index 62418ee331ada1e1b2430cdc65936a758ac442af..7bfa789672769df2af4d75588cbfc12434f24a36 100644 (file)
@@ -1844,7 +1844,10 @@ int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid)
                                return -ENOMEM;
                        }
                }
+       }
 
+       /* Do not assume that I40E_VLAN_ANY should be reset to VLAN 0 */
+       if (vid > 0 && !vsi->info.pvid) {
                list_for_each_entry(f, &vsi->mac_filter_list, list) {
                        if (i40e_find_filter(vsi, f->macaddr, I40E_VLAN_ANY,
                                             is_vf, is_netdev)) {