|
@@ -758,6 +758,7 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
|
|
|
struct fm10k_intfc *interface = netdev_priv(netdev);
|
|
|
struct fm10k_hw *hw = &interface->hw;
|
|
|
s32 err;
|
|
|
+ int i;
|
|
|
|
|
|
/* updates do not apply to VLAN 0 */
|
|
|
if (!vid)
|
|
@@ -775,6 +776,17 @@ static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set)
|
|
|
if (!set)
|
|
|
clear_bit(vid, interface->active_vlans);
|
|
|
|
|
|
+ /* disable the default VID on ring if we have an active VLAN */
|
|
|
+ for (i = 0; i < interface->num_rx_queues; i++) {
|
|
|
+ struct fm10k_ring *rx_ring = interface->rx_ring[i];
|
|
|
+ u16 rx_vid = rx_ring->vid & (VLAN_N_VID - 1);
|
|
|
+
|
|
|
+ if (test_bit(rx_vid, interface->active_vlans))
|
|
|
+ rx_ring->vid |= FM10K_VLAN_CLEAR;
|
|
|
+ else
|
|
|
+ rx_ring->vid &= ~FM10K_VLAN_CLEAR;
|
|
|
+ }
|
|
|
+
|
|
|
/* Do not remove default VID related entries from VLAN and MAC tables */
|
|
|
if (!set && vid == hw->mac.default_vid)
|
|
|
return 0;
|