aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 14:47:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 14:47:02 -0400
commit5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch)
tree7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /net/tipc/core.c
parent02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff)
parentec37a48d1d16c30b655ac5280209edf52a6775d4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits) bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL. vlan: Calling vlan_hwaccel_do_receive() is always valid. tproxy: use the interface primary IP address as a default value for --on-ip tproxy: added IPv6 support to the socket match cxgb3: function namespace cleanup tproxy: added IPv6 support to the TPROXY target tproxy: added IPv6 socket lookup function to nf_tproxy_core be2net: Changes to use only priority codes allowed by f/w tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled tproxy: added tproxy sockopt interface in the IPV6 layer tproxy: added udp6_lib_lookup function tproxy: added const specifiers to udp lookup functions tproxy: split off ipv6 defragmentation to a separate module l2tp: small cleanup nf_nat: restrict ICMP translation for embedded header can: mcp251x: fix generation of error frames can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set can-raw: add msg_flags to distinguish local traffic 9p: client code cleanup rds: make local functions/variables static ... Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'net/tipc/core.c')
-rw-r--r--net/tipc/core.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c
index 696468117985..e2a09eb8efd4 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -96,13 +96,8 @@ int tipc_net_id;
96int tipc_remote_management; 96int tipc_remote_management;
97 97
98 98
99int tipc_get_mode(void)
100{
101 return tipc_mode;
102}
103
104/** 99/**
105 * buf_acquire - creates a TIPC message buffer 100 * tipc_buf_acquire - creates a TIPC message buffer
106 * @size: message size (including TIPC header) 101 * @size: message size (including TIPC header)
107 * 102 *
108 * Returns a new buffer with data pointers set to the specified size. 103 * Returns a new buffer with data pointers set to the specified size.
@@ -111,7 +106,7 @@ int tipc_get_mode(void)
111 * There may also be unrequested tailroom present at the buffer's end. 106 * There may also be unrequested tailroom present at the buffer's end.
112 */ 107 */
113 108
114struct sk_buff *buf_acquire(u32 size) 109struct sk_buff *tipc_buf_acquire(u32 size)
115{ 110{
116 struct sk_buff *skb; 111 struct sk_buff *skb;
117 unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u; 112 unsigned int buf_size = (BUF_HEADROOM + size + 3) & ~3u;
@@ -129,7 +124,7 @@ struct sk_buff *buf_acquire(u32 size)
129 * tipc_core_stop_net - shut down TIPC networking sub-systems 124 * tipc_core_stop_net - shut down TIPC networking sub-systems
130 */ 125 */
131 126
132void tipc_core_stop_net(void) 127static void tipc_core_stop_net(void)
133{ 128{
134 tipc_eth_media_stop(); 129 tipc_eth_media_stop();
135 tipc_net_stop(); 130 tipc_net_stop();
@@ -154,7 +149,7 @@ int tipc_core_start_net(unsigned long addr)
154 * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode 149 * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode
155 */ 150 */
156 151
157void tipc_core_stop(void) 152static void tipc_core_stop(void)
158{ 153{
159 if (tipc_mode != TIPC_NODE_MODE) 154 if (tipc_mode != TIPC_NODE_MODE)
160 return; 155 return;
@@ -169,13 +164,14 @@ void tipc_core_stop(void)
169 tipc_nametbl_stop(); 164 tipc_nametbl_stop();
170 tipc_ref_table_stop(); 165 tipc_ref_table_stop();
171 tipc_socket_stop(); 166 tipc_socket_stop();
167 tipc_log_resize(0);
172} 168}
173 169
174/** 170/**
175 * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode 171 * tipc_core_start - switch TIPC from NOT RUNNING to SINGLE NODE mode
176 */ 172 */
177 173
178int tipc_core_start(void) 174static int tipc_core_start(void)
179{ 175{
180 int res; 176 int res;
181 177
@@ -203,7 +199,9 @@ static int __init tipc_init(void)
203{ 199{
204 int res; 200 int res;
205 201
206 tipc_log_resize(CONFIG_TIPC_LOG); 202 if (tipc_log_resize(CONFIG_TIPC_LOG) != 0)
203 warn("Unable to create log buffer\n");
204
207 info("Activated (version " TIPC_MOD_VER 205 info("Activated (version " TIPC_MOD_VER
208 " compiled " __DATE__ " " __TIME__ ")\n"); 206 " compiled " __DATE__ " " __TIME__ ")\n");
209 207
@@ -230,7 +228,6 @@ static void __exit tipc_exit(void)
230 tipc_core_stop_net(); 228 tipc_core_stop_net();
231 tipc_core_stop(); 229 tipc_core_stop();
232 info("Deactivated\n"); 230 info("Deactivated\n");
233 tipc_log_resize(0);
234} 231}
235 232
236module_init(tipc_init); 233module_init(tipc_init);
@@ -244,8 +241,6 @@ MODULE_VERSION(TIPC_MOD_VER);
244 241
245EXPORT_SYMBOL(tipc_attach); 242EXPORT_SYMBOL(tipc_attach);
246EXPORT_SYMBOL(tipc_detach); 243EXPORT_SYMBOL(tipc_detach);
247EXPORT_SYMBOL(tipc_get_addr);
248EXPORT_SYMBOL(tipc_get_mode);
249EXPORT_SYMBOL(tipc_createport); 244EXPORT_SYMBOL(tipc_createport);
250EXPORT_SYMBOL(tipc_deleteport); 245EXPORT_SYMBOL(tipc_deleteport);
251EXPORT_SYMBOL(tipc_ownidentity); 246EXPORT_SYMBOL(tipc_ownidentity);
@@ -260,23 +255,10 @@ EXPORT_SYMBOL(tipc_withdraw);
260EXPORT_SYMBOL(tipc_connect2port); 255EXPORT_SYMBOL(tipc_connect2port);
261EXPORT_SYMBOL(tipc_disconnect); 256EXPORT_SYMBOL(tipc_disconnect);
262EXPORT_SYMBOL(tipc_shutdown); 257EXPORT_SYMBOL(tipc_shutdown);
263EXPORT_SYMBOL(tipc_isconnected);
264EXPORT_SYMBOL(tipc_peer);
265EXPORT_SYMBOL(tipc_ref_valid);
266EXPORT_SYMBOL(tipc_send); 258EXPORT_SYMBOL(tipc_send);
267EXPORT_SYMBOL(tipc_send_buf);
268EXPORT_SYMBOL(tipc_send2name); 259EXPORT_SYMBOL(tipc_send2name);
269EXPORT_SYMBOL(tipc_forward2name);
270EXPORT_SYMBOL(tipc_send_buf2name);
271EXPORT_SYMBOL(tipc_forward_buf2name);
272EXPORT_SYMBOL(tipc_send2port); 260EXPORT_SYMBOL(tipc_send2port);
273EXPORT_SYMBOL(tipc_forward2port);
274EXPORT_SYMBOL(tipc_send_buf2port);
275EXPORT_SYMBOL(tipc_forward_buf2port);
276EXPORT_SYMBOL(tipc_multicast); 261EXPORT_SYMBOL(tipc_multicast);
277/* EXPORT_SYMBOL(tipc_multicast_buf); not available yet */
278EXPORT_SYMBOL(tipc_ispublished);
279EXPORT_SYMBOL(tipc_available_nodes);
280 262
281/* TIPC API for external bearers (see tipc_bearer.h) */ 263/* TIPC API for external bearers (see tipc_bearer.h) */
282 264
@@ -293,6 +275,4 @@ EXPORT_SYMBOL(tipc_createport_raw);
293EXPORT_SYMBOL(tipc_reject_msg); 275EXPORT_SYMBOL(tipc_reject_msg);
294EXPORT_SYMBOL(tipc_send_buf_fast); 276EXPORT_SYMBOL(tipc_send_buf_fast);
295EXPORT_SYMBOL(tipc_acknowledge); 277EXPORT_SYMBOL(tipc_acknowledge);
296EXPORT_SYMBOL(tipc_get_port);
297EXPORT_SYMBOL(tipc_get_handle);
298 278