diff --git a/lib/net/nvnetdrv/nvnetdrv.c b/lib/net/nvnetdrv/nvnetdrv.c index 82583477e..7f2ea1fa7 100644 --- a/lib/net/nvnetdrv/nvnetdrv.c +++ b/lib/net/nvnetdrv/nvnetdrv.c @@ -201,7 +201,7 @@ static void nvnetdrv_handle_rx_irq (void) goto release_packet; } - if (!(flags & NV_RX_ERROR) || (flags & NV_RX_FRAMINGERR)) { + if ((flags & NV_RX_ERROR_MASK) == 0) { uint16_t packet_length = rx_packet->length; if (flags & NV_RX_SUBTRACT1) { diff --git a/lib/net/nvnetdrv/nvnetdrv_regs.h b/lib/net/nvnetdrv/nvnetdrv_regs.h index a6caeb45c..9371e5f7f 100644 --- a/lib/net/nvnetdrv/nvnetdrv_regs.h +++ b/lib/net/nvnetdrv/nvnetdrv_regs.h @@ -202,4 +202,5 @@ enum { #define NV_RX_OVERFLOW (1 << 12) #define NV_RX_FRAMINGERR (1 << 13) #define NV_RX_ERROR (1 << 14) -#define NV_RX_AVAIL (1 << 15) \ No newline at end of file +#define NV_RX_AVAIL (1 << 15) +#define NV_RX_ERROR_MASK (NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4|NV_RX_CRCERR|NV_RX_OVERFLOW)