Revision 4f1c942b hw/dp8393x.c
b/hw/dp8393x.c | ||
---|---|---|
725 | 725 |
return -1; |
726 | 726 |
} |
727 | 727 |
|
728 |
static void nic_receive(VLANClientState *vc, const uint8_t * buf, size_t size)
|
|
728 |
static ssize_t nic_receive(VLANClientState *vc, const uint8_t * buf, size_t size)
|
|
729 | 729 |
{ |
730 | 730 |
uint16_t data[10]; |
731 | 731 |
dp8393xState *s = vc->opaque; |
... | ... | |
742 | 742 |
packet_type = receive_filter(s, buf, size); |
743 | 743 |
if (packet_type < 0) { |
744 | 744 |
DPRINTF("packet not for netcard\n"); |
745 |
return; |
|
745 |
return -1;
|
|
746 | 746 |
} |
747 | 747 |
|
748 | 748 |
/* XXX: Check byte ordering */ |
... | ... | |
755 | 755 |
s->memory_rw(s->mem_opaque, address, (uint8_t*)data, size, 0); |
756 | 756 |
if (data[0 * width] & 0x1) { |
757 | 757 |
/* Still EOL ; stop reception */ |
758 |
return; |
|
758 |
return -1;
|
|
759 | 759 |
} else { |
760 | 760 |
s->regs[SONIC_CRDA] = s->regs[SONIC_LLFA]; |
761 | 761 |
} |
... | ... | |
833 | 833 |
|
834 | 834 |
/* Done */ |
835 | 835 |
dp8393x_update_irq(s); |
836 |
|
|
837 |
return size; |
|
836 | 838 |
} |
837 | 839 |
|
838 | 840 |
static void nic_reset(void *opaque) |
Also available in: Unified diff