Ejemplo n.º 1
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;
}
Ejemplo n.º 2
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;
}
Ejemplo n.º 3
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;
}