summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCédric Le Goater2018-06-08 14:15:32 +0200
committerPeter Maydell2018-06-08 14:15:32 +0200
commitcd679a76a0ec8e634922454ab26b7ef8d2d114b2 (patch)
tree612c8d5fc794d48a5a89afa861b941208dcb48a8 /include
parentaspeed: add the pc9552 chips to the witherspoon machine (diff)
downloadqemu-cd679a76a0ec8e634922454ab26b7ef8d2d114b2.tar.gz
qemu-cd679a76a0ec8e634922454ab26b7ef8d2d114b2.tar.xz
qemu-cd679a76a0ec8e634922454ab26b7ef8d2d114b2.zip
ftgmac100: compute maximum frame size depending on the protocol
The maximum frame size includes the CRC and depends if a VLAN tag is inserted or not. Adjust the frame size limit in the transmit handler using on the FTGMAC100State buffer size and in the receive handler use the packet protocol. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180530061711.23673-2-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/net/ftgmac100.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/hw/net/ftgmac100.h b/include/hw/net/ftgmac100.h
index d9bc589fbf..94cfe05332 100644
--- a/include/hw/net/ftgmac100.h
+++ b/include/hw/net/ftgmac100.h
@@ -16,6 +16,11 @@
#include "hw/sysbus.h"
#include "net/net.h"
+/*
+ * Max frame size for the receiving buffer
+ */
+#define FTGMAC100_MAX_FRAME_SIZE 9220
+
typedef struct FTGMAC100State {
/*< private >*/
SysBusDevice parent_obj;
@@ -26,7 +31,7 @@ typedef struct FTGMAC100State {
qemu_irq irq;
MemoryRegion iomem;
- uint8_t *frame;
+ uint8_t frame[FTGMAC100_MAX_FRAME_SIZE];
uint32_t irq_state;
uint32_t isr;