diff options
author | Andy Fleming <afleming@freescale.com> | 2008-03-24 11:53:27 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-26 00:44:39 -0400 |
commit | 99da5003a5b085c12d996da1010e276e9b88672f (patch) | |
tree | 23fb14628162cfd1c64092e1c61327a098b1edf8 /drivers/net/gianfar.h | |
parent | faa89577621b4296a8869e75b90a546c951df968 (diff) |
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>
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r-- | drivers/net/gianfar.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 5b8991d822fc..fcfa1bd57280 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -340,6 +340,9 @@ extern const char gfar_driver_version[]; | |||
340 | #define RXBD_OVERRUN 0x0002 | 340 | #define RXBD_OVERRUN 0x0002 |
341 | #define RXBD_TRUNCATED 0x0001 | 341 | #define RXBD_TRUNCATED 0x0001 |
342 | #define RXBD_STATS 0x01ff | 342 | #define RXBD_STATS 0x01ff |
343 | #define RXBD_ERR (RXBD_LARGE | RXBD_SHORT | RXBD_NONOCTET \ | ||
344 | | RXBD_CRCERR | RXBD_OVERRUN \ | ||
345 | | RXBD_TRUNCATED) | ||
343 | 346 | ||
344 | /* Rx FCB status field bits */ | 347 | /* Rx FCB status field bits */ |
345 | #define RXFCB_VLN 0x8000 | 348 | #define RXFCB_VLN 0x8000 |