Exemplo n.º 1
0
int ne2k_send(struct nic_priv_data *nic_data, volatile void *packet, int length)
{
	pkey = -1;

	dp83902a_send(nic_data, (u8 *) packet, length, 666);
	/* FIXME: Put timeout here. */
	while(1) {
		dp83902a_poll(nic_data);
		if (pkey != -1) {
			vmm_printf("Packet sucesfully sent\n");
			return 0;
		}
	}
	return 0;
}
Exemplo n.º 2
0
int eth_send(volatile void *packet, int length) {
	int tmo;

	PRINTK("### eth_send\n");

	pkey = -1;

	dp83902a_send((unsigned char *) packet, length, 666);
	tmo = get_timer (0) + TOUT * CFG_HZ;
	while(1) {
		dp83902a_poll();
		if (pkey != -1) {
			PRINTK("Packet sucesfully sent\n");
			return 0;
		}
		if (get_timer (0) >= tmo) {
			printf("transmission error (timoeut)\n");
			return 0;
		}

	}
	return 0;
}
Exemplo n.º 3
0
static int ne2k_send(struct eth_device *dev, void *packet, int length)
{
    int tmo;

    debug("### ne2k_send\n");

    pkey = -1;

    dp83902a_send((u8 *) packet, length, 666);
    tmo = get_timer (0) + TOUT * CONFIG_SYS_HZ;
    while(1) {
        dp83902a_poll();
        if (pkey != -1) {
            PRINTK("Packet sucesfully sent\n");
            return 0;
        }
        if (get_timer (0) >= tmo) {
            printf("transmission error (timoeut)\n");
            return 0;
        }

    }
    return 0;
}