From: Jeff Kirsher Date: Fri, 10 Apr 2015 23:48:19 +0000 (-0700) Subject: fm10k: allow creation of VLAN on default vid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=661b2067910fdecb9a7053f7b5279a0ff61b0bf7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Jacob Keller Acked-by: Matthew Vick Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher --- 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) 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 */