diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-04-10 19:48:19 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-04-14 18:34:33 -0400 |
commit | 661b2067910fdecb9a7053f7b5279a0ff61b0bf7 (patch) | |
tree | df05fb9ecaa96829eba1741695767f1d77da1206 | |
parent | de445199161530636cd7ab9c85ba2eb6d15c380b (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c index 702d84547ba1..6981964a14d2 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | |||
@@ -770,15 +770,15 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set) | |||
770 | if (hw->mac.vlan_override) | 770 | if (hw->mac.vlan_override) |
771 | return -EACCES; | 771 | return -EACCES; |
772 | 772 | ||
773 | /* if default VLAN is already present do nothing */ | ||
774 | if (vid == hw->mac.default_vid) | ||
775 | return -EBUSY; | ||
776 | |||
777 | /* update active_vlans bitmask */ | 773 | /* update active_vlans bitmask */ |
778 | set_bit(vid, interface->active_vlans); | 774 | set_bit(vid, interface->active_vlans); |
779 | if (!set) | 775 | if (!set) |
780 | clear_bit(vid, interface->active_vlans); | 776 | clear_bit(vid, interface->active_vlans); |
781 | 777 | ||
778 | /* if default VLAN is already present do nothing */ | ||
779 | if (vid == hw->mac.default_vid) | ||
780 | return 0; | ||
781 | |||
782 | fm10k_mbx_lock(interface); | 782 | fm10k_mbx_lock(interface); |
783 | 783 | ||
784 | /* only need to update the VLAN if not in promiscuous mode */ | 784 | /* only need to update the VLAN if not in promiscuous mode */ |