diff options
author | Mitch Williams <mitch.a.williams@intel.com> | 2005-11-09 13:35:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2005-11-13 14:48:20 -0500 |
commit | a77b53258d76513c37e766dc0db1fc9db7c4ac1e (patch) | |
tree | ac3be1ed375bc7452bbf1ba4d4f962fe743e6307 /drivers | |
parent | 12479f9a823dc7d791f198af2d3e4efae418a65e (diff) |
[PATCH] bonding: make functions not static
The sysfs code needs access these functions, so make them
not static, and move the protos to the header file.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 25 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 12 |
2 files changed, 24 insertions, 13 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 7139d6e6bdb3..b8d617626c90 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -632,12 +632,11 @@ struct bond_parm_tbl xmit_hashtype_tbl[] = { | |||
632 | 632 | ||
633 | /*-------------------------- Forward declarations ---------------------------*/ | 633 | /*-------------------------- Forward declarations ---------------------------*/ |
634 | 634 | ||
635 | static inline void bond_set_mode_ops(struct bonding *bond, int mode); | ||
636 | static void bond_send_gratuitous_arp(struct bonding *bond); | 635 | static void bond_send_gratuitous_arp(struct bonding *bond); |
637 | 636 | ||
638 | /*---------------------------- General routines -----------------------------*/ | 637 | /*---------------------------- General routines -----------------------------*/ |
639 | 638 | ||
640 | static const char *bond_mode_name(int mode) | 639 | const char *bond_mode_name(int mode) |
641 | { | 640 | { |
642 | switch (mode) { | 641 | switch (mode) { |
643 | case BOND_MODE_ROUNDROBIN : | 642 | case BOND_MODE_ROUNDROBIN : |
@@ -1453,7 +1452,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond) | |||
1453 | * | 1452 | * |
1454 | * Warning: Caller must hold curr_slave_lock for writing. | 1453 | * Warning: Caller must hold curr_slave_lock for writing. |
1455 | */ | 1454 | */ |
1456 | static void bond_change_active_slave(struct bonding *bond, struct slave *new_active) | 1455 | void bond_change_active_slave(struct bonding *bond, struct slave *new_active) |
1457 | { | 1456 | { |
1458 | struct slave *old_active = bond->curr_active_slave; | 1457 | struct slave *old_active = bond->curr_active_slave; |
1459 | 1458 | ||
@@ -1527,7 +1526,7 @@ static void bond_change_active_slave(struct bonding *bond, struct slave *new_act | |||
1527 | * | 1526 | * |
1528 | * Warning: Caller must hold curr_slave_lock for writing. | 1527 | * Warning: Caller must hold curr_slave_lock for writing. |
1529 | */ | 1528 | */ |
1530 | static void bond_select_active_slave(struct bonding *bond) | 1529 | void bond_select_active_slave(struct bonding *bond) |
1531 | { | 1530 | { |
1532 | struct slave *best_slave; | 1531 | struct slave *best_slave; |
1533 | 1532 | ||
@@ -1595,7 +1594,7 @@ static void bond_detach_slave(struct bonding *bond, struct slave *slave) | |||
1595 | 1594 | ||
1596 | /*---------------------------------- IOCTL ----------------------------------*/ | 1595 | /*---------------------------------- IOCTL ----------------------------------*/ |
1597 | 1596 | ||
1598 | static int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev) | 1597 | int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev) |
1599 | { | 1598 | { |
1600 | dprintk("bond_dev=%p\n", bond_dev); | 1599 | dprintk("bond_dev=%p\n", bond_dev); |
1601 | dprintk("slave_dev=%p\n", slave_dev); | 1600 | dprintk("slave_dev=%p\n", slave_dev); |
@@ -1635,7 +1634,7 @@ static int bond_compute_features(struct bonding *bond) | |||
1635 | } | 1634 | } |
1636 | 1635 | ||
1637 | /* enslave device <slave> to bond device <master> */ | 1636 | /* enslave device <slave> to bond device <master> */ |
1638 | static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | 1637 | int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) |
1639 | { | 1638 | { |
1640 | struct bonding *bond = bond_dev->priv; | 1639 | struct bonding *bond = bond_dev->priv; |
1641 | struct slave *new_slave = NULL; | 1640 | struct slave *new_slave = NULL; |
@@ -2002,7 +2001,7 @@ err_undo_flags: | |||
2002 | * for Bonded connections: | 2001 | * for Bonded connections: |
2003 | * The first up interface should be left on and all others downed. | 2002 | * The first up interface should be left on and all others downed. |
2004 | */ | 2003 | */ |
2005 | static int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | 2004 | int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) |
2006 | { | 2005 | { |
2007 | struct bonding *bond = bond_dev->priv; | 2006 | struct bonding *bond = bond_dev->priv; |
2008 | struct slave *slave, *oldcurrent; | 2007 | struct slave *slave, *oldcurrent; |
@@ -2403,7 +2402,7 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in | |||
2403 | /*-------------------------------- Monitoring -------------------------------*/ | 2402 | /*-------------------------------- Monitoring -------------------------------*/ |
2404 | 2403 | ||
2405 | /* this function is called regularly to monitor each slave's link. */ | 2404 | /* this function is called regularly to monitor each slave's link. */ |
2406 | static void bond_mii_monitor(struct net_device *bond_dev) | 2405 | void bond_mii_monitor(struct net_device *bond_dev) |
2407 | { | 2406 | { |
2408 | struct bonding *bond = bond_dev->priv; | 2407 | struct bonding *bond = bond_dev->priv; |
2409 | struct slave *slave, *oldcurrent; | 2408 | struct slave *slave, *oldcurrent; |
@@ -2834,7 +2833,7 @@ static void bond_send_gratuitous_arp(struct bonding *bond) | |||
2834 | * arp is transmitted to generate traffic. see activebackup_arp_monitor for | 2833 | * arp is transmitted to generate traffic. see activebackup_arp_monitor for |
2835 | * arp monitoring in active backup mode. | 2834 | * arp monitoring in active backup mode. |
2836 | */ | 2835 | */ |
2837 | static void bond_loadbalance_arp_mon(struct net_device *bond_dev) | 2836 | void bond_loadbalance_arp_mon(struct net_device *bond_dev) |
2838 | { | 2837 | { |
2839 | struct bonding *bond = bond_dev->priv; | 2838 | struct bonding *bond = bond_dev->priv; |
2840 | struct slave *slave, *oldcurrent; | 2839 | struct slave *slave, *oldcurrent; |
@@ -2972,7 +2971,7 @@ out: | |||
2972 | * may have received. | 2971 | * may have received. |
2973 | * see loadbalance_arp_monitor for arp monitoring in load balancing mode | 2972 | * see loadbalance_arp_monitor for arp monitoring in load balancing mode |
2974 | */ | 2973 | */ |
2975 | static void bond_activebackup_arp_mon(struct net_device *bond_dev) | 2974 | void bond_activebackup_arp_mon(struct net_device *bond_dev) |
2976 | { | 2975 | { |
2977 | struct bonding *bond = bond_dev->priv; | 2976 | struct bonding *bond = bond_dev->priv; |
2978 | struct slave *slave; | 2977 | struct slave *slave; |
@@ -4448,7 +4447,7 @@ out: | |||
4448 | /* | 4447 | /* |
4449 | * set bond mode specific net device operations | 4448 | * set bond mode specific net device operations |
4450 | */ | 4449 | */ |
4451 | static inline void bond_set_mode_ops(struct bonding *bond, int mode) | 4450 | void bond_set_mode_ops(struct bonding *bond, int mode) |
4452 | { | 4451 | { |
4453 | struct net_device *bond_dev = bond->dev; | 4452 | struct net_device *bond_dev = bond->dev; |
4454 | 4453 | ||
@@ -4583,7 +4582,7 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par | |||
4583 | /* De-initialize device specific data. | 4582 | /* De-initialize device specific data. |
4584 | * Caller must hold rtnl_lock. | 4583 | * Caller must hold rtnl_lock. |
4585 | */ | 4584 | */ |
4586 | static inline void bond_deinit(struct net_device *bond_dev) | 4585 | void bond_deinit(struct net_device *bond_dev) |
4587 | { | 4586 | { |
4588 | struct bonding *bond = bond_dev->priv; | 4587 | struct bonding *bond = bond_dev->priv; |
4589 | 4588 | ||
@@ -4619,7 +4618,7 @@ static void bond_free_all(void) | |||
4619 | * Convert string input module parms. Accept either the | 4618 | * Convert string input module parms. Accept either the |
4620 | * number of the mode or its string name. | 4619 | * number of the mode or its string name. |
4621 | */ | 4620 | */ |
4622 | static inline int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl) | 4621 | int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl) |
4623 | { | 4622 | { |
4624 | int i; | 4623 | int i; |
4625 | 4624 | ||
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index c8a873fe76c5..96a733f2337a 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -260,6 +260,18 @@ extern inline void bond_set_slave_active_flags(struct slave *slave) | |||
260 | 260 | ||
261 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); | 261 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); |
262 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); | 262 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); |
263 | void bond_deinit(struct net_device *bond_dev); | ||
264 | int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); | ||
265 | int bond_release(struct net_device *bond_dev, struct net_device *slave_dev); | ||
266 | int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev); | ||
267 | void bond_mii_monitor(struct net_device *bond_dev); | ||
268 | void bond_loadbalance_arp_mon(struct net_device *bond_dev); | ||
269 | void bond_activebackup_arp_mon(struct net_device *bond_dev); | ||
270 | void bond_set_mode_ops(struct bonding *bond, int mode); | ||
271 | int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl); | ||
272 | const char *bond_mode_name(int mode); | ||
273 | void bond_select_active_slave(struct bonding *bond); | ||
274 | void bond_change_active_slave(struct bonding *bond, struct slave *new_active); | ||
263 | 275 | ||
264 | #endif /* _LINUX_BONDING_H */ | 276 | #endif /* _LINUX_BONDING_H */ |
265 | 277 | ||