diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 12 | ||||
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 2 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 3 |
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 2f4329e91a4c..a1fa8deb254e 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -101,7 +101,7 @@ static int arp_interval = BOND_LINK_ARP_INTERV; | |||
101 | static char *arp_ip_target[BOND_MAX_ARP_TARGETS] = { NULL, }; | 101 | static char *arp_ip_target[BOND_MAX_ARP_TARGETS] = { NULL, }; |
102 | static char *arp_validate = NULL; | 102 | static char *arp_validate = NULL; |
103 | static char *fail_over_mac = NULL; | 103 | static char *fail_over_mac = NULL; |
104 | struct bond_params bonding_defaults; | 104 | static struct bond_params bonding_defaults; |
105 | 105 | ||
106 | module_param(max_bonds, int, 0); | 106 | module_param(max_bonds, int, 0); |
107 | MODULE_PARM_DESC(max_bonds, "Max number of bonded devices"); | 107 | MODULE_PARM_DESC(max_bonds, "Max number of bonded devices"); |
@@ -4592,7 +4592,7 @@ static const struct net_device_ops bond_netdev_ops = { | |||
4592 | * Does not allocate but creates a /proc entry. | 4592 | * Does not allocate but creates a /proc entry. |
4593 | * Allowed to fail. | 4593 | * Allowed to fail. |
4594 | */ | 4594 | */ |
4595 | static int bond_init(struct net_device *bond_dev, struct bond_params *params) | 4595 | static int bond_init(struct net_device *bond_dev) |
4596 | { | 4596 | { |
4597 | struct bonding *bond = netdev_priv(bond_dev); | 4597 | struct bonding *bond = netdev_priv(bond_dev); |
4598 | 4598 | ||
@@ -4602,7 +4602,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params) | |||
4602 | rwlock_init(&bond->lock); | 4602 | rwlock_init(&bond->lock); |
4603 | rwlock_init(&bond->curr_slave_lock); | 4603 | rwlock_init(&bond->curr_slave_lock); |
4604 | 4604 | ||
4605 | bond->params = *params; /* copy params struct */ | 4605 | bond->params = bonding_defaults; |
4606 | 4606 | ||
4607 | bond->wq = create_singlethread_workqueue(bond_dev->name); | 4607 | bond->wq = create_singlethread_workqueue(bond_dev->name); |
4608 | if (!bond->wq) | 4608 | if (!bond->wq) |
@@ -5116,7 +5116,7 @@ static void bond_set_lockdep_class(struct net_device *dev) | |||
5116 | * Caller must NOT hold rtnl_lock; we need to release it here before we | 5116 | * Caller must NOT hold rtnl_lock; we need to release it here before we |
5117 | * set up our sysfs entries. | 5117 | * set up our sysfs entries. |
5118 | */ | 5118 | */ |
5119 | int bond_create(char *name, struct bond_params *params) | 5119 | int bond_create(const char *name) |
5120 | { | 5120 | { |
5121 | struct net_device *bond_dev; | 5121 | struct net_device *bond_dev; |
5122 | struct bonding *bond; | 5122 | struct bonding *bond; |
@@ -5159,7 +5159,7 @@ int bond_create(char *name, struct bond_params *params) | |||
5159 | * need to set function pointers. | 5159 | * need to set function pointers. |
5160 | */ | 5160 | */ |
5161 | 5161 | ||
5162 | res = bond_init(bond_dev, params); | 5162 | res = bond_init(bond_dev); |
5163 | if (res < 0) { | 5163 | if (res < 0) { |
5164 | goto out_netdev; | 5164 | goto out_netdev; |
5165 | } | 5165 | } |
@@ -5212,7 +5212,7 @@ static int __init bonding_init(void) | |||
5212 | init_rwsem(&bonding_rwsem); | 5212 | init_rwsem(&bonding_rwsem); |
5213 | 5213 | ||
5214 | for (i = 0; i < max_bonds; i++) { | 5214 | for (i = 0; i < max_bonds; i++) { |
5215 | res = bond_create(NULL, &bonding_defaults); | 5215 | res = bond_create(NULL); |
5216 | if (res) | 5216 | if (res) |
5217 | goto err; | 5217 | goto err; |
5218 | } | 5218 | } |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 5fb861a08664..1172fe649352 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -112,7 +112,7 @@ static ssize_t bonding_store_bonds(struct class *cls, const char *buffer, size_t | |||
112 | if (command[0] == '+') { | 112 | if (command[0] == '+') { |
113 | printk(KERN_INFO DRV_NAME | 113 | printk(KERN_INFO DRV_NAME |
114 | ": %s is being created...\n", ifname); | 114 | ": %s is being created...\n", ifname); |
115 | rv = bond_create(ifname, &bonding_defaults); | 115 | rv = bond_create(ifname); |
116 | if (rv) { | 116 | if (rv) { |
117 | printk(KERN_INFO DRV_NAME ": Bond creation failed.\n"); | 117 | printk(KERN_INFO DRV_NAME ": Bond creation failed.\n"); |
118 | res = rv; | 118 | res = rv; |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 41ceca12c68f..a6efa0963717 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -321,7 +321,7 @@ static inline void bond_unset_master_alb_flags(struct bonding *bond) | |||
321 | 321 | ||
322 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); | 322 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); |
323 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); | 323 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); |
324 | int bond_create(char *name, struct bond_params *params); | 324 | int bond_create(const char *name); |
325 | void bond_destroy(struct bonding *bond); | 325 | void bond_destroy(struct bonding *bond); |
326 | int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev); | 326 | int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev); |
327 | int bond_create_sysfs(void); | 327 | int bond_create_sysfs(void); |
@@ -349,7 +349,6 @@ extern const struct bond_parm_tbl bond_mode_tbl[]; | |||
349 | extern const struct bond_parm_tbl xmit_hashtype_tbl[]; | 349 | extern const struct bond_parm_tbl xmit_hashtype_tbl[]; |
350 | extern const struct bond_parm_tbl arp_validate_tbl[]; | 350 | extern const struct bond_parm_tbl arp_validate_tbl[]; |
351 | extern const struct bond_parm_tbl fail_over_mac_tbl[]; | 351 | extern const struct bond_parm_tbl fail_over_mac_tbl[]; |
352 | extern struct bond_params bonding_defaults; | ||
353 | extern struct bond_parm_tbl ad_select_tbl[]; | 352 | extern struct bond_parm_tbl ad_select_tbl[]; |
354 | 353 | ||
355 | /* exported from bond_sysfs.c */ | 354 | /* exported from bond_sysfs.c */ |