aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-09-22 16:28:30 +0200
committerJason Wang <jasowang@redhat.com>2016-09-27 17:54:22 +0800
commitfa26f018393f18f5e91334820546bef07b133b88 (patch)
tree25c382166f08458f94b614a3fc8b2668e3dd4c2a /hw
parenta16d8ef54b8274ce9e7d7d6377a5a11f3c74668b (diff)
downloadqemu-fa26f018393f18f5e91334820546bef07b133b88.zip
qemu-fa26f018393f18f5e91334820546bef07b133b88.tar.gz
qemu-fa26f018393f18f5e91334820546bef07b133b88.tar.bz2
imx_fec: fix error in qemu_send_packet argument
This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/imx_fec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index 1c415ab..50c7564 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -429,7 +429,7 @@ static void imx_fec_do_tx(IMXFECState *s)
frame_size += len;
if (bd.flags & ENET_BD_L) {
/* Last buffer in frame. */
- qemu_send_packet(qemu_get_queue(s->nic), frame, len);
+ qemu_send_packet(qemu_get_queue(s->nic), frame, frame_size);
ptr = frame;
frame_size = 0;
s->regs[ENET_EIR] |= ENET_INT_TXF;