aboutsummaryrefslogtreecommitdiffstats
path: root/hw/mcf_fec.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-05-18 13:40:55 +0100
committerMark McLoughlin <markmc@redhat.com>2009-06-09 11:38:49 +0100
commit4f1c942b7fb29864ad86cb3af9076da38f38f74e (patch)
tree2f51a121e715476c3986c0ae0b4513be555d8ee8 /hw/mcf_fec.c
parente3f5ec2b5e92706e3b807059f79b1fb5d936e567 (diff)
net: add return value to packet receive handler
This allows us to handle queue full conditions rather than dropping the packet on the floor. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'hw/mcf_fec.c')
-rw-r--r--hw/mcf_fec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c
index d2534d05f..179ec19e0 100644
--- a/hw/mcf_fec.c
+++ b/hw/mcf_fec.c
@@ -353,7 +353,7 @@ static int mcf_fec_can_receive(VLANClientState *vc)
return s->rx_enabled;
}
-static void mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
+static ssize_t mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
mcf_fec_state *s = vc->opaque;
mcf_fec_bd bd;
@@ -426,6 +426,7 @@ static void mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size
s->rx_descriptor = addr;
mcf_fec_enable_rx(s);
mcf_fec_update(s);
+ return size;
}
static CPUReadMemoryFunc *mcf_fec_readfn[] = {