summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_tht.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2013-04-02 13:43:41 +0000
committerBrad Smith <brad@cvs.openbsd.org>2013-04-02 13:43:41 +0000
commit09e6b9ea0146ca5733b0497d39df271c652f4471 (patch)
tree1435a4ac2b0beea7a42cd3cd0b31b1027826f542 /sys/dev/pci/if_tht.c
parent14e73cc20b2c7820415c6443b6849e7e4e1347fd (diff)
- Have the tht(4) ioctl handler for SIOCSIFFLAGS set ENETRESET
instead of calling tht_iff() directly. - Add a comment in tht_up() about the use of tht_iff(). - Have tht_iff() set IFF_ALLMULTI when in promisc mode. ok dlg@
Diffstat (limited to 'sys/dev/pci/if_tht.c')
-rw-r--r--sys/dev/pci/if_tht.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index cd46bacc8fd..dad29074220 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.125 2013/01/14 23:19:39 deraadt Exp $ */
+/* $OpenBSD: if_tht.c,v 1.126 2013/04/02 13:43:40 brad Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -888,7 +888,7 @@ tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
case SIOCSIFFLAGS:
if (ifp->if_flags & IFF_UP) {
if (ifp->if_flags & IFF_RUNNING)
- tht_iff(sc);
+ error = ENETRESET;
else
tht_up(sc);
} else {
@@ -973,6 +973,7 @@ tht_up(struct tht_softc *sc)
/* populate rxf fifo */
tht_rxf_fill(sc, 1);
+ /* program promiscuous mode and multicast filters */
tht_iff(sc);
ifp->if_flags |= IFF_RUNNING;
@@ -1019,9 +1020,10 @@ tht_iff(struct tht_softc *sc)
}
memset(imf, 0x00, sizeof(imf));
- if (ifp->if_flags & IFF_PROMISC)
+ if (ifp->if_flags & IFF_PROMISC) {
+ ifp->if_flags |= IFF_ALLMULTI;
rxf |= THT_REG_RX_FLT_PRM_ALL;
- else if (sc->sc_ac.ac_multirangecnt > 0) {
+ } else if (sc->sc_ac.ac_multirangecnt > 0) {
ifp->if_flags |= IFF_ALLMULTI;
memset(imf, 0xff, sizeof(imf));
} else {