Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/usb Pull up revision 1.54 (via patch, requested...



details:   https://anonhg.NetBSD.org/src/rev/56697bab738d
branches:  netbsd-1-5
changeset: 490852:56697bab738d
user:      he <he%NetBSD.org@localhost>
date:      Tue Mar 13 20:45:36 2001 +0000

description:
Pull up revision 1.54 (via patch, requested by tsutsui):
  Handle allmulti case correctly as a NetBSD network driver;
  if we are requested range of multicast address or too many
  multicast address, program multicast filter to receive all
  multicast address.   And set/clear IFF_ALLMULTI flag properly.

diffstat:

 sys/dev/usb/if_aue.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (44 lines):

diff -r 486495d6e704 -r 56697bab738d sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Tue Mar 13 20:44:29 2001 +0000
+++ b/sys/dev/usb/if_aue.c      Tue Mar 13 20:45:36 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.42.2.1 2000/09/20 19:57:23 itojun Exp $   */
+/*     $NetBSD: if_aue.c,v 1.42.2.2 2001/03/13 20:45:36 he Exp $       */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -613,7 +613,9 @@
 
        ifp = GET_IFP(sc);
 
-       if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
+       if (ifp->if_flags & IFF_PROMISC) {
+allmulti:
+               ifp->if_flags |= IFF_ALLMULTI;
                AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI);
                return;
        }
@@ -640,18 +642,16 @@
        ETHER_FIRST_MULTI(step, &sc->arpcom, enm);
 #endif
        while (enm != NULL) {
-#if 1
                if (memcmp(enm->enm_addrlo,
-                          enm->enm_addrhi, ETHER_ADDR_LEN) != 0) {
-                       ifp->if_flags |= IFF_ALLMULTI;
-                       AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI);
-                       return;
-               }
-#endif
+                   enm->enm_addrhi, ETHER_ADDR_LEN) != 0)
+                       goto allmulti;
+
                h = aue_crc(enm->enm_addrlo);
                AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0x7));
                ETHER_NEXT_MULTI(step, enm);
        }
+
+       ifp->if_flags &= ~IFF_ALLMULTI;
 #endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
 }
 



Home | Main Index | Thread Index | Old Index