[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/5] hw/net/stellaris_enet: Correct handling of pack
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 2/5] hw/net/stellaris_enet: Correct handling of packet padding |
Date: |
Tue, 1 Apr 2014 17:53:04 +0100 |
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 <address@hidden>
---
hw/net/stellaris_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index bd844cd..d0da819 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -265,7 +265,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);
--
1.9.0
- [Qemu-devel] [PATCH 0/5] stellaris_enet: overhaul TX handling, Peter Maydell, 2014/04/01
- [Qemu-devel] [PATCH 5/5] hw/net/stellaris_enet: Fix debug format strings, Peter Maydell, 2014/04/01
- [Qemu-devel] [PATCH 4/5] hw/net/stellaris_enet: Correctly implement the TR and THR registers, Peter Maydell, 2014/04/01
- [Qemu-devel] [PATCH 2/5] hw/net/stellaris_enet: Correct handling of packet padding,
Peter Maydell <=
- [Qemu-devel] [PATCH 1/5] hw/net/stellaris_enet: Restructure tx_fifo code to avoid buffer overrun, Peter Maydell, 2014/04/01
- [Qemu-devel] [PATCH 3/5] hw/net/stellaris_enet: Rewrite tx fifo handling code, Peter Maydell, 2014/04/01
- Re: [Qemu-devel] [PATCH 3/5] hw/net/stellaris_enet: Rewrite tx fifo handling code, Dr. David Alan Gilbert, 2014/04/01