summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2021-12-31 08:15:48 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2021-12-31 08:15:48 +0000
commitc0baaae14bc3dddff6c5607778a9dc8bb93b97b5 (patch)
treedd55c90856ddabf69a4d69c92b01785a91aeff58
parentda9a3786dfd7f9d9dd4bb8b9a42f564e9a9653f1 (diff)
Fix up handling of IFF_ALLMULTI and call uaq_iff() from uaq_init().
from Brad
-rw-r--r--sys/dev/usb/if_uaq.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/usb/if_uaq.c b/sys/dev/usb/if_uaq.c
index 6bbeacdcdbd..e814aea0f46 100644
--- a/sys/dev/usb/if_uaq.c
+++ b/sys/dev/usb/if_uaq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uaq.c,v 1.1 2021/09/04 12:11:45 jmatthew Exp $ */
+/* $OpenBSD: if_uaq.c,v 1.2 2021/12/31 08:15:47 jmatthew Exp $ */
/*-
* Copyright (c) 2021 Jonathan Matthew <jonathan@d14n.org>
* All rights reserved.
@@ -658,12 +658,15 @@ uaq_iff(struct uaq_softc *sc)
sc->sc_rxctl &= ~(UAQ_SFR_RX_CTL_PRO | UAQ_SFR_RX_CTL_AMALL |
UAQ_SFR_RX_CTL_AM);
- if (ifp->if_flags & IFF_PROMISC || sc->sc_ac.ac_multirangecnt > 0) {
+ ifp->if_flags &= ~IFF_ALLMULTI;
+
+ if (ifp->if_flags & IFF_PROMISC) {
+ ifp->if_flags |= IFF_ALLMULTI;
sc->sc_rxctl |= UAQ_SFR_RX_CTL_PRO;
- } else if (ifp->if_flags & IFF_ALLMULTI ||
- sc->sc_ac.ac_multirangecnt > 0) {
+ } else if (sc->sc_ac.ac_multirangecnt > 0) {
+ ifp->if_flags |= IFF_ALLMULTI;
sc->sc_rxctl |= UAQ_SFR_RX_CTL_AMALL;
- } else if (sc->sc_ac.ac_multicnt > 0) {
+ } else {
sc->sc_rxctl |= UAQ_SFR_RX_CTL_AM;
bzero(filter, sizeof(filter));
@@ -780,6 +783,8 @@ uaq_init(void *xsc)
return;
}
+ uaq_iff(sc);
+
uaq_ifmedia_upd(ifp);
ifp->if_flags |= IFF_RUNNING;