diff --git a/sys/dev/ic/rtl8169.c b/sys/dev/ic/rtl8169.c index 3911b3a7ea56..071d08c3fcb1 100644 --- a/sys/dev/ic/rtl8169.c +++ b/sys/dev/ic/rtl8169.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.7 2005/02/13 15:43:33 jdolecek Exp $ */ +/* $NetBSD: rtl8169.c,v 1.8 2005/02/13 16:04:18 jdolecek Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1483,10 +1483,8 @@ re_intr(void *arg) if ((status & RTK_INTRS_CPLUS) == 0) break; - if (status & RTK_ISR_RX_OK) - re_rxeof(sc); - - if (status & RTK_ISR_RX_ERR) + if ((status & RTK_ISR_RX_OK) || + (status & RTK_ISR_RX_ERR)) re_rxeof(sc); if ((status & RTK_ISR_TIMEOUT_EXPIRED) || @@ -1797,24 +1795,20 @@ re_init(struct ifnet *ifp) rxcfg |= RTK_RXCFG_RX_INDIV; /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) { + if (ifp->if_flags & IFF_PROMISC) rxcfg |= RTK_RXCFG_RX_ALLPHYS; - CSR_WRITE_4(sc, RTK_RXCFG, rxcfg); - } else { + else rxcfg &= ~RTK_RXCFG_RX_ALLPHYS; - CSR_WRITE_4(sc, RTK_RXCFG, rxcfg); - } + CSR_WRITE_4(sc, RTK_RXCFG, rxcfg); /* * Set capture broadcast bit to capture broadcast frames. */ - if (ifp->if_flags & IFF_BROADCAST) { + if (ifp->if_flags & IFF_BROADCAST) rxcfg |= RTK_RXCFG_RX_BROAD; - CSR_WRITE_4(sc, RTK_RXCFG, rxcfg); - } else { + else rxcfg &= ~RTK_RXCFG_RX_BROAD; - CSR_WRITE_4(sc, RTK_RXCFG, rxcfg); - } + CSR_WRITE_4(sc, RTK_RXCFG, rxcfg); /* * Program the multicast filter, if necessary.