diff options
author | Hervé Poussineau <hpoussin@reactos.org> | 2015-06-03 22:45:42 +0200 |
---|---|---|
committer | Leon Alrae <leon.alrae@imgtec.com> | 2015-06-11 10:13:29 +0100 |
commit | f2f62c4db244f392381c9061c4185ced98f9be57 (patch) | |
tree | 20457f790c178cfc5a5bed7b05e65ea7b846d2b2 /hw/net/dp8393x.c | |
parent | d791d60f1cf944f578aa26ca9f8903ce5dda1c78 (diff) |
net/dp8393x: always calculate proper checksums
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Diffstat (limited to 'hw/net/dp8393x.c')
-rw-r--r-- | hw/net/dp8393x.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 2297231aa4..093f0cc3aa 100644 --- a/hw/net/dp8393x.c +++ b/hw/net/dp8393x.c @@ -21,16 +21,10 @@ #include "qemu/timer.h" #include "net/net.h" #include "hw/mips/mips.h" +#include <zlib.h> //#define DEBUG_SONIC -/* Calculate CRCs properly on Rx packets */ -#define SONIC_CALCULATE_RXCRC - -#if defined(SONIC_CALCULATE_RXCRC) -/* For crc32 */ -#include <zlib.h> -#endif #ifdef DEBUG_SONIC #define DPRINTF(fmt, ...) \ @@ -764,11 +758,7 @@ static ssize_t nic_receive(NetClientState *nc, const uint8_t * buf, size_t size) s->regs[SONIC_TRBA0] = s->regs[SONIC_CRBA0]; /* Calculate the ethernet checksum */ -#ifdef SONIC_CALCULATE_RXCRC checksum = cpu_to_le32(crc32(0, buf, rx_len)); -#else - checksum = 0; -#endif /* Put packet into RBA */ DPRINTF("Receive packet at %08x\n", (s->regs[SONIC_CRBA1] << 16) | s->regs[SONIC_CRBA0]); |