]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/tipc/core.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / net / tipc / core.c
index e2a09eb8efd459957c79475a24e9b5849537f90f..e071579e08503c35aa22b6feed83fa8200fb08e2 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/random.h>
-
 #include "core.h"
-#include "dbg.h"
 #include "ref.h"
-#include "net.h"
-#include "user_reg.h"
 #include "name_table.h"
 #include "subscr.h"
 #include "config.h"
 
 
-#ifndef CONFIG_TIPC_ZONES
-#define CONFIG_TIPC_ZONES 3
-#endif
-
-#ifndef CONFIG_TIPC_CLUSTERS
-#define CONFIG_TIPC_CLUSTERS 1
-#endif
-
 #ifndef CONFIG_TIPC_NODES
 #define CONFIG_TIPC_NODES 255
 #endif
 
-#ifndef CONFIG_TIPC_SLAVE_NODES
-#define CONFIG_TIPC_SLAVE_NODES 0
-#endif
-
 #ifndef CONFIG_TIPC_PORTS
 #define CONFIG_TIPC_PORTS 8191
 #endif
@@ -85,10 +65,7 @@ const char tipc_alphabet[] =
 /* configurable TIPC parameters */
 
 u32 tipc_own_addr;
-int tipc_max_zones;
-int tipc_max_clusters;
 int tipc_max_nodes;
-int tipc_max_slaves;
 int tipc_max_ports;
 int tipc_max_subscriptions;
 int tipc_max_publications;
@@ -138,10 +115,11 @@ int tipc_core_start_net(unsigned long addr)
 {
        int res;
 
-       if ((res = tipc_net_start(addr)) ||
-           (res = tipc_eth_media_start())) {
+       res = tipc_net_start(addr);
+       if (!res)
+               res = tipc_eth_media_start();
+       if (res)
                tipc_core_stop_net();
-       }
        return res;
 }
 
@@ -160,7 +138,6 @@ static void tipc_core_stop(void)
        tipc_handler_stop();
        tipc_cfg_stop();
        tipc_subscr_stop();
-       tipc_reg_stop();
        tipc_nametbl_stop();
        tipc_ref_table_stop();
        tipc_socket_stop();
@@ -181,16 +158,22 @@ static int tipc_core_start(void)
        get_random_bytes(&tipc_random, sizeof(tipc_random));
        tipc_mode = TIPC_NODE_MODE;
 
-       if ((res = tipc_handler_start()) ||
-           (res = tipc_ref_table_init(tipc_max_ports, tipc_random)) ||
-           (res = tipc_reg_start()) ||
-           (res = tipc_nametbl_init()) ||
-           (res = tipc_k_signal((Handler)tipc_subscr_start, 0)) ||
-           (res = tipc_k_signal((Handler)tipc_cfg_init, 0)) ||
-           (res = tipc_netlink_start()) ||
-           (res = tipc_socket_init())) {
+       res = tipc_handler_start();
+       if (!res)
+               res = tipc_ref_table_init(tipc_max_ports, tipc_random);
+       if (!res)
+               res = tipc_nametbl_init();
+       if (!res)
+               res = tipc_k_signal((Handler)tipc_subscr_start, 0);
+       if (!res)
+               res = tipc_k_signal((Handler)tipc_cfg_init, 0);
+       if (!res)
+               res = tipc_netlink_start();
+       if (!res)
+               res = tipc_socket_init();
+       if (res)
                tipc_core_stop();
-       }
+
        return res;
 }
 
@@ -210,13 +193,11 @@ static int __init tipc_init(void)
        tipc_max_publications = 10000;
        tipc_max_subscriptions = 2000;
        tipc_max_ports = CONFIG_TIPC_PORTS;
-       tipc_max_zones = CONFIG_TIPC_ZONES;
-       tipc_max_clusters = CONFIG_TIPC_CLUSTERS;
        tipc_max_nodes = CONFIG_TIPC_NODES;
-       tipc_max_slaves = CONFIG_TIPC_SLAVE_NODES;
        tipc_net_id = 4711;
 
-       if ((res = tipc_core_start()))
+       res = tipc_core_start();
+       if (res)
                err("Unable to start in single node mode\n");
        else
                info("Started in single node mode\n");
@@ -236,43 +217,3 @@ module_exit(tipc_exit);
 MODULE_DESCRIPTION("TIPC: Transparent Inter Process Communication");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(TIPC_MOD_VER);
-
-/* Native TIPC API for kernel-space applications (see tipc.h) */
-
-EXPORT_SYMBOL(tipc_attach);
-EXPORT_SYMBOL(tipc_detach);
-EXPORT_SYMBOL(tipc_createport);
-EXPORT_SYMBOL(tipc_deleteport);
-EXPORT_SYMBOL(tipc_ownidentity);
-EXPORT_SYMBOL(tipc_portimportance);
-EXPORT_SYMBOL(tipc_set_portimportance);
-EXPORT_SYMBOL(tipc_portunreliable);
-EXPORT_SYMBOL(tipc_set_portunreliable);
-EXPORT_SYMBOL(tipc_portunreturnable);
-EXPORT_SYMBOL(tipc_set_portunreturnable);
-EXPORT_SYMBOL(tipc_publish);
-EXPORT_SYMBOL(tipc_withdraw);
-EXPORT_SYMBOL(tipc_connect2port);
-EXPORT_SYMBOL(tipc_disconnect);
-EXPORT_SYMBOL(tipc_shutdown);
-EXPORT_SYMBOL(tipc_send);
-EXPORT_SYMBOL(tipc_send2name);
-EXPORT_SYMBOL(tipc_send2port);
-EXPORT_SYMBOL(tipc_multicast);
-
-/* TIPC API for external bearers (see tipc_bearer.h) */
-
-EXPORT_SYMBOL(tipc_block_bearer);
-EXPORT_SYMBOL(tipc_continue);
-EXPORT_SYMBOL(tipc_disable_bearer);
-EXPORT_SYMBOL(tipc_enable_bearer);
-EXPORT_SYMBOL(tipc_recv_msg);
-EXPORT_SYMBOL(tipc_register_media);
-
-/* TIPC API for external APIs (see tipc_port.h) */
-
-EXPORT_SYMBOL(tipc_createport_raw);
-EXPORT_SYMBOL(tipc_reject_msg);
-EXPORT_SYMBOL(tipc_send_buf_fast);
-EXPORT_SYMBOL(tipc_acknowledge);
-