diff options
author | Jason Wright <jason@cvs.openbsd.org> | 1999-02-15 16:22:27 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 1999-02-15 16:22:27 +0000 |
commit | 0a569ea721153ffade428752f5591053b57423b4 (patch) | |
tree | 7a1ed0bfbf187bf2ce395445acaf901f8f6aab03 /sys/arch | |
parent | 420d6f278c49d24c7dc4cf3e00bab5faf8895004 (diff) |
better promisc/allmulti handling
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/be.c | 23 | ||||
-rw-r--r-- | sys/arch/sparc/dev/bevar.h | 3 |
2 files changed, 12 insertions, 14 deletions
diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index 27531b9cb75..191ea5b069c 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.20 1999/02/08 13:39:29 jason Exp $ */ +/* $OpenBSD: be.c,v 1.21 1999/02/15 16:22:26 jason Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -558,7 +558,6 @@ beioctl(ifp, cmd, data) break; case SIOCSIFFLAGS: - sc->sc_promisc = ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI); if ((ifp->if_flags & IFF_UP) == 0 && (ifp->if_flags & IFF_RUNNING) != 0) { /* @@ -676,12 +675,10 @@ beinit(sc) br->mac_addr0 = (sc->sc_arpcom.ac_enaddr[0] << 8) | sc->sc_arpcom.ac_enaddr[1]; - br->htable3 = 0; - br->htable2 = 0; - br->htable1 = 0; - br->htable0 = 0; - br->rx_cfg = BE_BR_RXCFG_HENABLE | BE_BR_RXCFG_FIFO; + + be_mcreset(sc); + DELAY(20); br->tx_cfg = BE_BR_TXCFG_FIFO; @@ -1227,6 +1224,13 @@ be_mcreset(sc) struct ether_multi *enm; struct ether_multistep step; + if (ifp->if_flags & IFF_PROMISC) { + br->rx_cfg |= BE_BR_RXCFG_PMISC; + return; + } + else + br->rx_cfg &= ~BE_BR_RXCFG_PMISC; + if (ifp->if_flags & IFF_ALLMULTI) { br->htable3 = 0xffff; br->htable2 = 0xffff; @@ -1235,11 +1239,6 @@ be_mcreset(sc) return; } - if (ifp->if_flags & IFF_PROMISC) { - br->rx_cfg |= BE_BR_RXCFG_PMISC; - return; - } - hash[3] = hash[2] = hash[1] = hash[0] = 0; ETHER_FIRST_MULTI(step, ac, enm); diff --git a/sys/arch/sparc/dev/bevar.h b/sys/arch/sparc/dev/bevar.h index ac0b11067c4..d770f6f7cc9 100644 --- a/sys/arch/sparc/dev/bevar.h +++ b/sys/arch/sparc/dev/bevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bevar.h,v 1.9 1998/11/02 05:50:59 jason Exp $ */ +/* $OpenBSD: bevar.h,v 1.10 1999/02/15 16:22:26 jason Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -43,7 +43,6 @@ struct besoftc { u_int sc_rev; int sc_channel; /* channel number */ - int sc_promisc; int sc_burst; int sc_tcvr_type; int sc_nticks; /* negotiation ticks */ |