|
@@ -76,38 +76,14 @@ struct sk_buff *tipc_buf_acquire(u32 size)
|
|
return skb;
|
|
return skb;
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * tipc_core_stop_net - shut down TIPC networking sub-systems
|
|
|
|
- */
|
|
|
|
-static void tipc_core_stop_net(void)
|
|
|
|
-{
|
|
|
|
- tipc_net_stop();
|
|
|
|
- tipc_bearer_cleanup();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * start_net - start TIPC networking sub-systems
|
|
|
|
- */
|
|
|
|
-int tipc_core_start_net(unsigned long addr)
|
|
|
|
-{
|
|
|
|
- int res;
|
|
|
|
-
|
|
|
|
- tipc_net_start(addr);
|
|
|
|
- res = tipc_bearer_setup();
|
|
|
|
- if (res < 0)
|
|
|
|
- goto err;
|
|
|
|
- return res;
|
|
|
|
-
|
|
|
|
-err:
|
|
|
|
- tipc_core_stop_net();
|
|
|
|
- return res;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode
|
|
* tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode
|
|
*/
|
|
*/
|
|
static void tipc_core_stop(void)
|
|
static void tipc_core_stop(void)
|
|
{
|
|
{
|
|
|
|
+ tipc_handler_stop();
|
|
|
|
+ tipc_net_stop();
|
|
|
|
+ tipc_bearer_cleanup();
|
|
tipc_netlink_stop();
|
|
tipc_netlink_stop();
|
|
tipc_cfg_stop();
|
|
tipc_cfg_stop();
|
|
tipc_subscr_stop();
|
|
tipc_subscr_stop();
|
|
@@ -158,7 +134,13 @@ static int tipc_core_start(void)
|
|
if (err)
|
|
if (err)
|
|
goto out_cfg;
|
|
goto out_cfg;
|
|
|
|
|
|
|
|
+ err = tipc_bearer_setup();
|
|
|
|
+ if (err)
|
|
|
|
+ goto out_bearer;
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
|
|
+out_bearer:
|
|
|
|
+ tipc_cfg_stop();
|
|
out_cfg:
|
|
out_cfg:
|
|
tipc_subscr_stop();
|
|
tipc_subscr_stop();
|
|
out_subscr:
|
|
out_subscr:
|
|
@@ -203,8 +185,6 @@ static int __init tipc_init(void)
|
|
|
|
|
|
static void __exit tipc_exit(void)
|
|
static void __exit tipc_exit(void)
|
|
{
|
|
{
|
|
- tipc_handler_stop();
|
|
|
|
- tipc_core_stop_net();
|
|
|
|
tipc_core_stop();
|
|
tipc_core_stop();
|
|
pr_info("Deactivated\n");
|
|
pr_info("Deactivated\n");
|
|
}
|
|
}
|