summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_uaq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/if_uaq.c')
-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;