Use 'frame_size' instead of 'len' when calling qemu_send_packet(), failing to do so results in malformed packets send in case when that packed is fragmented into multiple DMA transactions.
Cc: Peter Maydell <[email protected]> Cc: Jason Wang <[email protected]> Cc: Philippe Mathieu-Daudé <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 77d27f763e..6cb9e2e20e 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -556,7 +556,7 @@ static void imx_enet_do_tx(IMXFECState *s, uint32_t index) } /* Last buffer in frame. */ - qemu_send_packet(qemu_get_queue(s->nic), s->frame, len); + qemu_send_packet(qemu_get_queue(s->nic), s->frame, frame_size); ptr = s->frame; frame_size = 0; -- 2.14.3
