gianfar: Only process completed frames
If the LAST bit is not set in the RxBD, it's possible we're processing an incomplete frame, which is bad. While we're at it, add a constant for the error bitmask, so the whole if-clause fits on one line, and is more legible. Signed-off-by: Dai Haruki <dai.haruki@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
Jeff Garzik
parent
faa8957762
commit
99da5003a5
@@ -340,6 +340,9 @@ extern const char gfar_driver_version[];
|
||||
#define RXBD_OVERRUN 0x0002
|
||||
#define RXBD_TRUNCATED 0x0001
|
||||
#define RXBD_STATS 0x01ff
|
||||
#define RXBD_ERR (RXBD_LARGE | RXBD_SHORT | RXBD_NONOCTET \
|
||||
| RXBD_CRCERR | RXBD_OVERRUN \
|
||||
| RXBD_TRUNCATED)
|
||||
|
||||
/* Rx FCB status field bits */
|
||||
#define RXFCB_VLN 0x8000
|
||||
|
Reference in New Issue
Block a user