aboutsummaryrefslogtreecommitdiff
path: root/hw/net/stellaris_enet.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-05-13 16:09:36 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-06-25 15:33:46 -0500
commit38a55f30700346b8b53e52445eaaf6b0e579a17b (patch)
treefaf97671adf1fdbb179326c1c02c11952553f594 /hw/net/stellaris_enet.c
parent7d09facec7d0b39bf1e8642ceb9a8a70f80919e6 (diff)
hw/net/stellaris_enet: Correct handling of packet padding
The PADEN bit in the transmit control register enables padding of short data packets out to the required minimum length. However a typo here meant we were adjusting tx_fifo_len rather than tx_frame_len, so the padding didn't actually happen. Fix this bug. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: qemu-stable@nongnu.org (cherry picked from commit 7fd5f064d1c1a827a95ffe678418b3d5b8d2f108) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw/net/stellaris_enet.c')
-rw-r--r--hw/net/stellaris_enet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index 8a1d0d172a..376c7b0c9e 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -264,7 +264,7 @@ static void stellaris_enet_write(void *opaque, hwaddr offset,
s->tx_frame_len -= 4;
if ((s->tctl & SE_TCTL_PADEN) && s->tx_frame_len < 60) {
memset(&s->tx_fifo[s->tx_frame_len], 0, 60 - s->tx_frame_len);
- s->tx_fifo_len = 60;
+ s->tx_frame_len = 60;
}
qemu_send_packet(qemu_get_queue(s->nic), s->tx_fifo,
s->tx_frame_len);