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/pci Pull up revision 1.45 (requested by tsutsui):
details: https://anonhg.NetBSD.org/src/rev/486495d6e704
branches: netbsd-1-5
changeset: 490851:486495d6e704
user: he <he%NetBSD.org@localhost>
date: Tue Mar 13 20:44:29 2001 +0000
description:
Pull up revision 1.45 (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/pci/if_vr.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 9c9997b1bff8 -r 486495d6e704 sys/dev/pci/if_vr.c
--- a/sys/dev/pci/if_vr.c Tue Mar 13 20:44:13 2001 +0000
+++ b/sys/dev/pci/if_vr.c Tue Mar 13 20:44:29 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vr.c,v 1.34.4.1 2000/09/13 16:48:24 tron Exp $ */
+/* $NetBSD: if_vr.c,v 1.34.4.2 2001/03/13 20:44:29 he Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -479,7 +479,9 @@
rxfilt = CSR_READ_1(sc, VR_RXCFG);
- if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
+ if (ifp->if_flags & IFF_PROMISC) {
+allmulti:
+ ifp->if_flags |= IFF_ALLMULTI;
rxfilt |= VR_RXCFG_RX_MULTI;
CSR_WRITE_1(sc, VR_RXCFG, rxfilt);
CSR_WRITE_4(sc, VR_MAR0, 0xFFFFFFFF);
@@ -494,8 +496,9 @@
/* now program new ones */
ETHER_FIRST_MULTI(step, &sc->vr_ec, enm);
while (enm != NULL) {
- if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0)
- continue;
+ if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
+ ETHER_ADDR_LEN) != 0)
+ goto allmulti;
h = vr_calchash(enm->enm_addrlo);
@@ -507,6 +510,8 @@
mcnt++;
}
+ ifp->if_flags &= ~IFF_ALLMULTI;
+
if (mcnt)
rxfilt |= VR_RXCFG_RX_MULTI;
else
Home |
Main Index |
Thread Index |
Old Index