imx_fec: fix error in qemu_send_packet argument
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Sep 2016 14:28:30 +0000 (16:28 +0200)
committerJason Wang <jasowang@redhat.com>
Tue, 27 Sep 2016 09:54:22 +0000 (17:54 +0800)
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>
hw/net/imx_fec.c

index 1c415ab..50c7564 100644 (file)
@@ -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;