예제 #1
0
/***
 *  rt_loopback_open
 *  @rtdev
 */
static int rt_loopback_open (struct rtnet_device *rtdev)
{
    rt_stack_connect(rtdev, &STACK_manager);
    rtnetif_start_queue(rtdev);

    return 0;
}
예제 #2
0
/***
 *  rt_loopback_open
 *  @rtdev
 */
static int rt_loopback_open (struct rtnet_device *rtdev)
{
    RTNET_MOD_INC_USE_COUNT;

    rt_stack_connect(rtdev, &STACK_manager);
    rtnetif_start_queue(rtdev);

    return 0;
}
static int
scc_enet_open(struct rtnet_device *rtdev)
{
	/* I should reset the ring buffers here, but I don't yet know
	 * a simple way to do that.
	 */
	rtnetif_start_queue(rtdev);

	return 0;					/* Always succeed */
}
예제 #4
0
/***
 *  rt2x00_open
 *  @rtdev
 */
static int rt2x00_open (struct rtnet_device *rtnet_dev) {

    struct rtwlan_device * rtwlan_dev = rtnetdev_priv(rtnet_dev);
    struct _rt2x00_core  * core   = rtwlan_priv(rtwlan_dev);
    int			  status  = 0x00000000;

    DEBUG("Start.\n");

    if(test_and_set_bit(DEVICE_ENABLED, &core->flags)){
        ERROR("device already enabled.\n");
        return -EBUSY;
    }

    /*
     * Start rtnet interface.
     */
    rt_stack_connect(rtnet_dev, &STACK_manager);

    status = rt2x00_radio_on(core);
    if(status){
        clear_bit(DEVICE_ENABLED, &core->flags);
        ERROR("Couldn't activate radio.\n");
        return status;
    }

    core->config.led_status = 1;
    core->config.update_flags |= UPDATE_LED_STATUS;
    rt2x00_update_config(core);
  
    rtnetif_start_queue(rtnet_dev);

    RTNET_MOD_INC_USE_COUNT;

    DEBUG("Exit success.\n");

    return 0;
}
예제 #5
0
static int
tulip_open(/*RTnet*/struct rtnet_device *rtdev)
{
	struct tulip_private *tp = (struct tulip_private *)rtdev->priv;
	int retval;

	if ((retval = /*RTnet*/rtdm_irq_request(&tp->irq_handle, rtdev->irq,
						tulip_interrupt, 0, "rt_tulip",
						rtdev))) {
		printk("%s: Unable to install ISR for IRQ %d\n",
			  rtdev->name,rtdev->irq);
		return retval;
	}

	rt_stack_connect(rtdev, &STACK_manager);

	tulip_init_ring (rtdev);

	tulip_up (rtdev);

	rtnetif_start_queue (rtdev);

	return 0;
}