2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 18:53:52 +08:00

fm10k: allow creation of VLAN on default vid

Previously, the user was not allowed to create a VLAN interface on top
of the switch default vid.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Jeff Kirsher 2015-04-10 16:48:19 -07:00
parent de44519916
commit 661b206791

View File

@ -770,15 +770,15 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
if (hw->mac.vlan_override)
return -EACCES;
/* if default VLAN is already present do nothing */
if (vid == hw->mac.default_vid)
return -EBUSY;
/* update active_vlans bitmask */
set_bit(vid, interface->active_vlans);
if (!set)
clear_bit(vid, interface->active_vlans);
/* if default VLAN is already present do nothing */
if (vid == hw->mac.default_vid)
return 0;
fm10k_mbx_lock(interface);
/* only need to update the VLAN if not in promiscuous mode */