Revision ccf1d14a hw/rtl8139.c
b/hw/rtl8139.c | ||
---|---|---|
53 | 53 |
/* debug RTL8139 card C+ mode only */ |
54 | 54 |
//#define DEBUG_RTL8139CP 1 |
55 | 55 |
|
56 |
/* RTL8139 provides frame CRC with received packet, this feature seems to be |
|
57 |
ignored by most drivers, disabled by default */ |
|
58 |
//#define RTL8139_CALCULATE_RXCRC 1 |
|
56 |
/* Calculate CRCs properly on Rx packets */ |
|
57 |
#define RTL8139_CALCULATE_RXCRC 1 |
|
59 | 58 |
|
60 | 59 |
/* Uncomment to enable on-board timer interrupts */ |
61 | 60 |
//#define RTL8139_ONBOARD_TIMER 1 |
... | ... | |
747 | 746 |
int wrapped = MOD2(s->RxBufAddr + size, s->RxBufferSize); |
748 | 747 |
|
749 | 748 |
/* write packet data */ |
750 |
if (wrapped && s->RxBufferSize < 65536 && !rtl8139_RxWrap(s))
|
|
749 |
if (wrapped && !(s->RxBufferSize < 65536 && rtl8139_RxWrap(s)))
|
|
751 | 750 |
{ |
752 | 751 |
DEBUG_PRINT((">>> RTL8139: rx packet wrapped in buffer at %d\n", size-wrapped)); |
753 | 752 |
|
... | ... | |
1023 | 1022 |
|
1024 | 1023 |
/* write checksum */ |
1025 | 1024 |
#if defined (RTL8139_CALCULATE_RXCRC) |
1026 |
val = cpu_to_le32(crc32(~0, buf, size));
|
|
1025 |
val = cpu_to_le32(crc32(0, buf, size)); |
|
1027 | 1026 |
#else |
1028 | 1027 |
val = 0; |
1029 | 1028 |
#endif |
... | ... | |
1129 | 1128 |
|
1130 | 1129 |
/* write checksum */ |
1131 | 1130 |
#if defined (RTL8139_CALCULATE_RXCRC) |
1132 |
val = cpu_to_le32(crc32(~0, buf, size));
|
|
1131 |
val = cpu_to_le32(crc32(0, buf, size)); |
|
1133 | 1132 |
#else |
1134 | 1133 |
val = 0; |
1135 | 1134 |
#endif |
Also available in: Unified diff