Revision 4f1c942b hw/mipsnet.c
b/hw/mipsnet.c | ||
---|---|---|
75 | 75 |
return !mipsnet_buffer_full(s); |
76 | 76 |
} |
77 | 77 |
|
78 |
static void mipsnet_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
|
|
78 |
static ssize_t mipsnet_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
|
|
79 | 79 |
{ |
80 | 80 |
MIPSnetState *s = vc->opaque; |
81 | 81 |
|
... | ... | |
83 | 83 |
printf("mipsnet: receiving len=%d\n", size); |
84 | 84 |
#endif |
85 | 85 |
if (!mipsnet_can_receive(vc)) |
86 |
return; |
|
86 |
return -1;
|
|
87 | 87 |
|
88 | 88 |
s->busy = 1; |
89 | 89 |
|
... | ... | |
98 | 98 |
/* Now we can signal we have received something. */ |
99 | 99 |
s->intctl |= MIPSNET_INTCTL_RXDONE; |
100 | 100 |
mipsnet_update_irq(s); |
101 |
|
|
102 |
return size; |
|
101 | 103 |
} |
102 | 104 |
|
103 | 105 |
static uint32_t mipsnet_ioport_read(void *opaque, uint32_t addr) |
Also available in: Unified diff