status bits should be &'ed against status to be really functional.
authorMichael Neumann <mneumann@ntecs.de>
Tue, 5 Aug 2014 11:59:38 +0000 (13:59 +0200)
committerMichael Neumann <mneumann@ntecs.de>
Tue, 5 Aug 2014 11:59:38 +0000 (13:59 +0200)
Obtained-From: FreeBSD (r212764 d7bdcc10e4df9e7f755be4e1853272956eb39493)

sys/dev/netif/alc/if_alc.c

index 5996038..4bf8cc1 100644 (file)
@@ -2793,8 +2793,8 @@ alc_rxeof(struct alc_softc *sc, struct rx_rdesc *rrd)
                 *  errored frames.
                 */
                status |= RRD_TCP_UDPCSUM_NOK | RRD_IPCSUM_NOK;
-               if ((RRD_ERR_CRC | RRD_ERR_ALIGN | RRD_ERR_TRUNC |
-                   RRD_ERR_RUNT) != 0)
+               if ((status & (RRD_ERR_CRC | RRD_ERR_ALIGN |
+                    RRD_ERR_TRUNC | RRD_ERR_RUNT)) != 0)
                        return;
        }