Example #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;
}
Example #2
0
int eth_rx() {
	int j, tmo;

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

	tmo = get_timer (0) + TOUT * CFG_HZ;
	while(1) {
		dp83902a_poll();
		if (nrx > 0) {
			for(j=0; j<nrx; j++) {
				NetReceive(&pbuf[j*2000], plen[j]);
			}
			nrx = 0;
			return 1;
		}
		if (get_timer (0) >= tmo) {
			printf("timeout during rx\n");
			return 0;
		}
	}
	return 0;
}
Example #3
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;
}
Example #4
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;
}
Example #5
0
static int ne2k_recv(struct eth_device *dev)
{
    dp83902a_poll();
    return 1;
}
Example #6
0
int ne2k_rx(struct nic_priv_data *nic_data)
{
	dp83902a_poll(nic_data);
	return 1;
}
int eth_rx() {
	dp83902a_poll();
	return 1;
}