Skip to content

Commit

Permalink
ixgbe: Avoid adding VLAN 0 twice to VLVF and VFTA
Browse files Browse the repository at this point in the history
We were adding VLAN 0 twice each time we restored the VLAN configuration.
Instead of doing it twice we can just start working through the active
VLANs from ID 1 on and skip the double write.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Apr 4, 2016
1 parent 18be4fc commit 06bb1c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
@@ -4172,11 +4172,11 @@ static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)

static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
{
u16 vid;
u16 vid = 1;

ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);

for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
for_each_set_bit_from(vid, adapter->active_vlans, VLAN_N_VID)
ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
}

0 comments on commit 06bb1c3

Please sign in to comment.