This patch enhances the pcnet NIC emulation with better loopback mode
support, including CRC generation for looped-back packets in "raw" mode.
The patch has practically no impact on the normal RX and TX path.
Successfully tested against an ancient proprietary pcnet driver that
does a lot of hardware checks on boot-up and now works fine over qemu as
well.
Signed-off-by: Jan Kiszka <address@hidden>
---
hw/pcnet.c | 89 ++++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 59 insertions(+), 30 deletions(-)
Index: b/hw/pcnet.c
===================================================================
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -35,6 +35,8 @@
*
http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR92C990.txt
*/
+#include <netinet/in.h>