aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:19 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:49 -0500
commit8f92df6ad49da958d97e171762d0a97a3dc738f1 (patch)
treead848109f978d225b42ea219d7f45f10aa008a2c /net/tipc/net.c
parent51a8e4dee7653698ba4c6e7de71053665f075273 (diff)
tipc: Remove prototype code for supporting multiple clusters
Eliminates routines, data structures, and files that were intended to allow TIPC to support a network containing multiple clusters. Currently, TIPC supports only networks consisting of a single cluster within a single zone, so this code is unnecessary. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index 3967f1f6d97f..3baf55ee0985 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -112,12 +112,23 @@
112DEFINE_RWLOCK(tipc_net_lock); 112DEFINE_RWLOCK(tipc_net_lock);
113struct network tipc_net; 113struct network tipc_net;
114 114
115static int net_start(void)
116{
117 tipc_net.nodes = kcalloc(tipc_max_nodes + 1,
118 sizeof(*tipc_net.nodes), GFP_ATOMIC);
119 tipc_net.highest_node = 0;
120
121 return tipc_net.nodes ? 0 : -ENOMEM;
122}
123
115static void net_stop(void) 124static void net_stop(void)
116{ 125{
117 u32 c_num; 126 u32 n_num;
118 127
119 for (c_num = 1; c_num <= tipc_max_clusters; c_num++) 128 for (n_num = 1; n_num <= tipc_net.highest_node; n_num++)
120 tipc_cltr_delete(tipc_net.clusters[c_num]); 129 tipc_node_delete(tipc_net.nodes[n_num]);
130 kfree(tipc_net.nodes);
131 tipc_net.nodes = NULL;
121} 132}
122 133
123static void net_route_named_msg(struct sk_buff *buf) 134static void net_route_named_msg(struct sk_buff *buf)
@@ -218,10 +229,12 @@ int tipc_net_start(u32 addr)
218 tipc_named_reinit(); 229 tipc_named_reinit();
219 tipc_port_reinit(); 230 tipc_port_reinit();
220 231
221 if ((res = tipc_cltr_init()) || 232 res = net_start();
222 (res = tipc_bclink_init())) { 233 if (res)
234 return res;
235 res = tipc_bclink_init();
236 if (res)
223 return res; 237 return res;
224 }
225 238
226 tipc_k_signal((Handler)tipc_subscr_start, 0); 239 tipc_k_signal((Handler)tipc_subscr_start, 0);
227 tipc_k_signal((Handler)tipc_cfg_init, 0); 240 tipc_k_signal((Handler)tipc_cfg_init, 0);