Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb udav(4): Prune dead branch: legacy IFF_ALLMULTI ...



details:   https://anonhg.NetBSD.org/src/rev/2c29ea03b3b2
branches:  trunk
changeset: 369508:2c29ea03b3b2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Aug 20 14:09:20 2022 +0000

description:
udav(4): Prune dead branch: legacy IFF_ALLMULTI is never set here.

diffstat:

 sys/dev/usb/if_udav.c |  18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diffs (46 lines):

diff -r 03dfd9e46b07 -r 2c29ea03b3b2 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c     Sat Aug 20 14:09:10 2022 +0000
+++ b/sys/dev/usb/if_udav.c     Sat Aug 20 14:09:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_udav.c,v 1.98 2022/08/20 14:08:59 riastradh Exp $   */
+/*     $NetBSD: if_udav.c,v 1.99 2022/08/20 14:09:20 riastradh Exp $   */
 /*     $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $   */
 
 /*
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.98 2022/08/20 14:08:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.99 2022/08/20 14:09:20 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -582,14 +582,6 @@
                ETHER_UNLOCK(ec);
                UDAV_SETBIT(un, UDAV_RCR, UDAV_RCR_ALL | UDAV_RCR_PRMSC);
                return;
-       } else if (ifp->if_flags & IFF_ALLMULTI) { /* XXX ??? Can't happen? */
-               ETHER_LOCK(ec);
-allmulti:
-               ec->ec_flags |= ETHER_F_ALLMULTI;
-               ETHER_UNLOCK(ec);
-               UDAV_SETBIT(un, UDAV_RCR, UDAV_RCR_ALL);
-               UDAV_CLRBIT(un, UDAV_RCR, UDAV_RCR_PRMSC);
-               return;
        }
 
        /* first, zot all the existing hash bits */
@@ -603,7 +595,11 @@
        while (enm != NULL) {
                if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
                    ETHER_ADDR_LEN) != 0) {
-                       goto allmulti;
+                       ec->ec_flags |= ETHER_F_ALLMULTI;
+                       ETHER_UNLOCK(ec);
+                       UDAV_SETBIT(un, UDAV_RCR, UDAV_RCR_ALL);
+                       UDAV_CLRBIT(un, UDAV_RCR, UDAV_RCR_PRMSC);
+                       return;
                }
 
                h = UDAV_CALCHASH(enm->enm_addrlo);



Home | Main Index | Thread Index | Old Index