Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203671
b: refs/heads/master
c: 03dc2f4
h: refs/heads/master
i:
  203669: 42800c2
  203667: 74b2cea
  203663: 68b9492
v: v3
  • Loading branch information
Jay Vosburgh authored and David S. Miller committed Jul 22, 2010
1 parent 6ba898f commit a9e08b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f35188faa0fbabefac476536994f4b6f3677380f
refs/heads/master: 03dc2f4c525afb9488edb687c2e1f7057d59b40e
16 changes: 3 additions & 13 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,24 +570,19 @@ static void bond_add_vlans_on_slave(struct bonding *bond, struct net_device *sla
struct vlan_entry *vlan;
const struct net_device_ops *slave_ops = slave_dev->netdev_ops;

write_lock_bh(&bond->lock);

if (!bond->vlgrp)
goto out;
return;

if ((slave_dev->features & NETIF_F_HW_VLAN_RX) &&
slave_ops->ndo_vlan_rx_register)
slave_ops->ndo_vlan_rx_register(slave_dev, bond->vlgrp);

if (!(slave_dev->features & NETIF_F_HW_VLAN_FILTER) ||
!(slave_ops->ndo_vlan_rx_add_vid))
goto out;
return;

list_for_each_entry(vlan, &bond->vlan_list, vlan_list)
slave_ops->ndo_vlan_rx_add_vid(slave_dev, vlan->vlan_id);

out:
write_unlock_bh(&bond->lock);
}

static void bond_del_vlans_from_slave(struct bonding *bond,
Expand All @@ -597,10 +592,8 @@ static void bond_del_vlans_from_slave(struct bonding *bond,
struct vlan_entry *vlan;
struct net_device *vlan_dev;

write_lock_bh(&bond->lock);

if (!bond->vlgrp)
goto out;
return;

if (!(slave_dev->features & NETIF_F_HW_VLAN_FILTER) ||
!(slave_ops->ndo_vlan_rx_kill_vid))
Expand All @@ -621,9 +614,6 @@ static void bond_del_vlans_from_slave(struct bonding *bond,
if ((slave_dev->features & NETIF_F_HW_VLAN_RX) &&
slave_ops->ndo_vlan_rx_register)
slave_ops->ndo_vlan_rx_register(slave_dev, NULL);

out:
write_unlock_bh(&bond->lock);
}

/*------------------------------- Link status -------------------------------*/
Expand Down

0 comments on commit a9e08b8

Please sign in to comment.