Fix multicast filter programming.

This commit is contained in:
Bill Paul 2000-01-14 17:03:00 +00:00
parent e330fda4f8
commit e4f25e405c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55981

View file

@ -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);