]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/bonding/bond_sysfs.c
Remove obsolete #include <linux/config.h>
[linux-2.6-omap-h63xx.git] / drivers / net / bonding / bond_sysfs.c
index 32d13da43a0b6b1587186c460a6849e82ae97d81..cfe4dc3a93a3b8c1264ee03dd4516f3aa44dfbd4 100644 (file)
@@ -20,7 +20,6 @@
  * file called LICENSE.
  *
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/sched.h>
@@ -260,7 +259,7 @@ static ssize_t bonding_store_slaves(struct class_device *cd, const char *buffer,
        char *ifname;
        int i, res, found, ret = count;
        struct slave *slave;
-       struct net_device *dev = 0;
+       struct net_device *dev = NULL;
        struct bonding *bond = to_bond(cd);
 
        /* Quick sanity check -- is the bond interface up? */
@@ -424,6 +423,12 @@ static ssize_t bonding_store_mode(struct class_device *cd, const char *buf, size
                ret = -EINVAL;
                goto out;
        } else {
+               if (bond->params.mode == BOND_MODE_8023AD)
+                       bond_unset_master_3ad_flags(bond);
+
+               if (bond->params.mode == BOND_MODE_ALB)
+                       bond_unset_master_alb_flags(bond);
+
                bond->params.mode = new_value;
                bond_set_mode_ops(bond, bond->params.mode);
                printk(KERN_INFO DRV_NAME ": %s: setting mode to %s (%d).\n",
@@ -995,7 +1000,7 @@ static ssize_t bonding_store_primary(struct class_device *cd, const char *buf, s
                        printk(KERN_INFO DRV_NAME
                               ": %s: Setting primary slave to None.\n",
                               bond->dev->name);
-                       bond->primary_slave = 0;
+                       bond->primary_slave = NULL;
                                bond_select_active_slave(bond);
                } else {
                        printk(KERN_INFO DRV_NAME
@@ -1123,7 +1128,7 @@ static ssize_t bonding_store_active_slave(struct class_device *cd, const char *b
                        printk(KERN_INFO DRV_NAME
                               ": %s: Setting active slave to None.\n",
                               bond->dev->name);
-                       bond->primary_slave = 0;
+                       bond->primary_slave = NULL;
                                bond_select_active_slave(bond);
                } else {
                        printk(KERN_INFO DRV_NAME