From 39da78bb33cd9dd59b6d989aa5d7656206fd6adc Mon Sep 17 00:00:00 2001 From: wpaul Date: Fri, 14 Jan 2000 17:03:00 +0000 Subject: Fix multicast filter programming. --- sys/dev/usb/if_cue.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/dev/usb/if_cue.c') diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 0c8741c..f832e61 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -372,15 +372,17 @@ static void cue_setmulti(sc) if (ifma->ifma_addr->sa_family != AF_LINK) continue; h = cue_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); - sc->cue_mctab[h >> 3] |= 1 << (h & 0xF); + sc->cue_mctab[h >> 3] |= 1 << (h & 0x7); } /* * Also include the broadcast address in the filter * so we can receive broadcast frames. */ - h = cue_crc(etherbroadcastaddr); - sc->cue_mctab[h >> 4] |= 1 << (h & 0xF); + if (ifp->if_flags & IFF_BROADCAST) { + h = cue_crc(etherbroadcastaddr); + sc->cue_mctab[h >> 3] |= 1 << (h & 0x7); + } cue_mem(sc, CUE_CMD_WRITESRAM, CUE_MCAST_TABLE_ADDR, &sc->cue_mctab, CUE_MCAST_TABLE_LEN); -- cgit v1.1