Пример #1
0
/**
 *      rtnet_mgr_init():       initialize the RTnet
 *
 */
int rtnet_init(void)
{
        int err = 0;

	printk("\n*** RTnet - built on %s, %s ***\n\n", __DATE__, __TIME__);
        printk("RTnet: init real-time networking\n");
        init_crc32();

        if ( (err=rtskb_pool_init()) )
                return err;

        rtsockets_init();
        rtnet_dev_init();
        rt_inet_proto_init();
        rtnet_chrdev_init();

#ifdef CONFIG_PROC_FS
        err = rtnet_mgr_proc_register ();
#endif

        /* initialise the Stack-Manager */
        if ( (err=rt_stack_mgr_init(&STACK_manager)) )
		return err;

        /* initialise the RTDEV-Manager */
        if ( (err=rt_rtdev_mgr_init(&RTDEV_manager)) )
		return err;

        return 0;
}
Пример #2
0
/**
 *  rtnet_init()
 */
int __init rtnet_init(void)
{
    int err = 0;


    printk("\n*** RTnet " RTNET_VERSION " - built on %s, %s ***\n\n",
           __DATE__, __TIME__);
    printk("RTnet: initialising real-time networking\n");

    if ((err = init_crc32()) != 0)
        goto err_out1;

    if ((err = rtskb_pools_init()) != 0)
        goto err_out2;

    /* initialize the Stack-Manager */
    if ((err=rt_stack_mgr_init(&STACK_manager)) != 0)
        goto err_out2;

    /* initialize the RTDEV-Manager */
    if ((err=rt_rtdev_mgr_init(&RTDEV_manager)) != 0)
        goto err_out3;

    rtsockets_init();
    rt_inet_proto_init();
    rtnet_chrdev_init();

    if ((err = rtpc_init()) != 0)
        goto err_out4;

#ifdef CONFIG_PROC_FS
    if ((err = rtnet_proc_register()) != 0)
        goto err_out5;
#endif

    return 0;


err_out5:
    rtpc_cleanup();

err_out4:
    rtnet_chrdev_release();
    rt_inet_proto_release();

    rt_rtdev_mgr_delete(&RTDEV_manager);

err_out3:
    rt_stack_mgr_delete(&STACK_manager);

err_out2:
    rtskb_pools_release();

err_out1:
    cleanup_crc32();

    return err;
}
Пример #3
0
/**
 *  rtnet_init()
 */
int __init rtnet_init(void)
{
    int err = 0;


    printk("\n*** RTnet " RTNET_PACKAGE_VERSION " - built on " __DATE__ " " __TIME__
           " ***\n\n");
    printk("RTnet: initialising real-time networking\n");

    if ((err = rtskb_pools_init()) != 0)
        goto err_out1;

#ifdef CONFIG_PROC_FS
    if ((err = rtnet_proc_register()) != 0)
        goto err_out2;
#endif

    /* initialize the Stack-Manager */
    if ((err = rt_stack_mgr_init(&STACK_manager)) != 0)
        goto err_out3;

    /* initialize the RTDEV-Manager */
    if ((err = rt_rtdev_mgr_init(&RTDEV_manager)) != 0)
        goto err_out4;

    rtnet_chrdev_init();

    if ((err = rtwlan_init()) != 0)
        goto err_out5;

    if ((err = rtpc_init()) != 0)
        goto err_out6;

    return 0;


err_out6:
    rtwlan_exit();

err_out5:
    rtnet_chrdev_release();
    rt_rtdev_mgr_delete(&RTDEV_manager);

err_out4:
    rt_stack_mgr_delete(&STACK_manager);

err_out3:
#ifdef CONFIG_PROC_FS
    rtnet_proc_unregister();

err_out2:
#endif
    rtskb_pools_release();

err_out1:
    return err;
}
Пример #4
0
/**
 *  rtnet_init()
 */
int __init rtnet_init(void)
{
    int err = 0;


    printk("\n*** RTnet for Xenomai v" XENO_VERSION_STRING " ***\n\n");
    printk("RTnet: initialising real-time networking\n");

    if ((err = rtskb_pools_init()) != 0)
        goto err_out1;

#ifdef CONFIG_XENO_OPT_VFILE
    if ((err = rtnet_proc_register()) != 0)
        goto err_out2;
#endif

    /* initialize the Stack-Manager */
    if ((err = rt_stack_mgr_init(&STACK_manager)) != 0)
        goto err_out3;

    /* initialize the RTDEV-Manager */
    if ((err = rt_rtdev_mgr_init(&RTDEV_manager)) != 0)
        goto err_out4;

    rtnet_chrdev_init();

    if ((err = rtwlan_init()) != 0)
        goto err_out5;

    if ((err = rtpc_init()) != 0)
        goto err_out6;

    return 0;


err_out6:
    rtwlan_exit();

err_out5:
    rtnet_chrdev_release();
    rt_rtdev_mgr_delete(&RTDEV_manager);

err_out4:
    rt_stack_mgr_delete(&STACK_manager);

err_out3:
#ifdef CONFIG_XENO_OPT_VFILE
    rtnet_proc_unregister();

err_out2:
#endif
    rtskb_pools_release();

err_out1:
    return err;
}
Пример #5
0
/**
 *      rtnet_mgr_init():       initialize the RTnet
 *
 */
int rtnet_init(void)
{
        int err = 0;

	printk("\n*** RTnet - %s, %s ***\n\n", __DATE__, __TIME__);
        printk("RTnet: init real-time networking\n");
        init_crc32();

        if ( (err=rtskb_pool_init()) )
                return err;

        rtsockets_init();
        rtnet_dev_init();
        rt_inet_proto_init();
        rtnet_chrdev_init();

#ifdef CONFIG_PROC_FS
        err = rtnet_mgr_proc_register ();
#endif

        /* initialise the Stack-Manager */
        if ( (err=rt_stack_mgr_init(&STACK_manager)) )
		goto proc_mgr_err;

        /* initialise the RTDEV-Manager */
        if ( (err=rt_rtdev_mgr_init(&RTDEV_manager)) )
		goto  stack_mgr_err;

        /* initialise the RT-Wakeup-Manager */
        if ( (err=rt_wakeup_mgr_init(&rt_wakeup_manager)) )
		goto rtdev_mgr_err;

        /* initialise the Proxy-Wakeup-Manager */
        if ( (err=proxy_wakeup_mgr_init(&proxy_wakeup_manager)) )
		goto wakeup_mgr_err;

        return 0;

 wakeup_mgr_err:
	rt_wakeup_mgr_delete(&rt_wakeup_manager);
 rtdev_mgr_err:
	rt_rtdev_mgr_delete(&RTDEV_manager);
 stack_mgr_err:
	rt_stack_mgr_delete(&STACK_manager);
 proc_mgr_err:
#ifdef CONFIG_PROC_FS
        rtnet_mgr_proc_unregister ();
#endif
	return err;
}