]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/bonding/bond_3ad.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6-omap-h63xx.git] / drivers / net / bonding / bond_3ad.c
index 084f0292ea6e13d029244564b112b1a0582a8c34..6106660a4a44b9a68f7a5b9a9c9c26a5b45ee689 100644 (file)
@@ -310,7 +310,7 @@ static inline int __check_agg_selection_timer(struct port *port)
  */
 static inline void __get_rx_machine_lock(struct port *port)
 {
-       spin_lock(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
+       spin_lock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
 }
 
 /**
@@ -320,7 +320,7 @@ static inline void __get_rx_machine_lock(struct port *port)
  */
 static inline void __release_rx_machine_lock(struct port *port)
 {
-       spin_unlock(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
+       spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock));
 }
 
 /**
@@ -2076,8 +2076,10 @@ void bond_3ad_unbind_slave(struct slave *slave)
  * times out, and it selects an aggregator for the ports that are yet not
  * related to any aggregator, and selects the active aggregator for a bond.
  */
-void bond_3ad_state_machine_handler(struct bonding *bond)
+void bond_3ad_state_machine_handler(struct work_struct *work)
 {
+       struct bonding *bond = container_of(work, struct bonding,
+                                           ad_work.work);
        struct port *port;
        struct aggregator *aggregator;
 
@@ -2105,6 +2107,7 @@ void bond_3ad_state_machine_handler(struct bonding *bond)
                        aggregator = __get_first_agg(port);
                        ad_agg_selection_logic(aggregator);
                }
+               bond_3ad_set_carrier(bond);
        }
 
        // for each port run the state machines
@@ -2128,7 +2131,7 @@ void bond_3ad_state_machine_handler(struct bonding *bond)
        }
 
 re_arm:
-       mod_timer(&(BOND_AD_INFO(bond).ad_timer), jiffies + ad_delta_in_ticks);
+       queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks);
 out:
        read_unlock(&bond->lock);
 }
@@ -2427,7 +2430,7 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac
        struct slave *slave = NULL;
        int ret = NET_RX_DROP;
 
-       if (dev->nd_net != &init_net)
+       if (dev_net(dev) != &init_net)
                goto out;
 
        if (!(dev->flags & IFF_MASTER))