- errcode = rxdesc.status;
- if (errcode & (1<<16))
- outputf("3C90X: Rx Overrun (%hX)",errcode>>16);
- else if (errcode & (1<<17))
- outputf("3C90X: Runt Frame (%hX)",errcode>>16);
- else if (errcode & (1<<18))
- outputf("3C90X: Alignment Error (%hX)",errcode>>16);
- else if (errcode & (1<<19))
- outputf("3C90X: CRC Error (%hX)",errcode>>16);
- else if (errcode & (1<<20))
- outputf("3C90X: Oversized Frame (%hX)",errcode>>16);
- else
- outputf("3C90X: Packet error (%hX)",errcode>>16);
+ /** Check for Error (else we have good packet) **/
+ if (rxdescs[rxcons].status & (1<<14))
+ {
+ errcode = rxdescs[rxcons].status;
+ if (errcode & (1<<16))
+ outputf("3C90X: Rx Overrun (%hX)",errcode>>16);
+ else if (errcode & (1<<17))
+ outputf("3C90X: Runt Frame (%hX)",errcode>>16);
+ else if (errcode & (1<<18))
+ outputf("3C90X: Alignment Error (%hX)",errcode>>16);
+ else if (errcode & (1<<19))
+ outputf("3C90X: CRC Error (%hX)",errcode>>16);
+ else if (errcode & (1<<20))
+ outputf("3C90X: Oversized Frame (%hX)",errcode>>16);
+ else
+ outputf("3C90X: Packet error (%hX)",errcode>>16);
+
+ p = NULL;
+ pbuf_free(rxpbufs[rxcons]); /* Bounce the old one before setting it up again. */
+ } else {
+ p = rxpbufs[rxcons];
+ pbuf_realloc(p, rxdescs[rxcons].status & 0x1FFF); /* Resize the packet to how large it actually is. */
+ }