aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-01-11 13:25:37 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-11 13:25:37 +0000
commit52cfd5846b8979805077ce7608aa36c18a2a9f32 (patch)
tree59092667c7717eeee7a467696a4f840210f5564f /hw/net
parentf93f961c40a31228e3f66e66d99a68937aa242c5 (diff)
downloadqemu-52cfd5846b8979805077ce7608aa36c18a2a9f32.zip
qemu-52cfd5846b8979805077ce7608aa36c18a2a9f32.tar.gz
qemu-52cfd5846b8979805077ce7608aa36c18a2a9f32.tar.bz2
imx_fec: Use correct length for packet size
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 <peter.maydell@linaro.org> Cc: Jason Wang <jasowang@redhat.com> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Cc: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Cc: yurovsky@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/net')
-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 77d27f7..6cb9e2e 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;