diff options
-rw-r--r-- | sys/pc98/pc98/if_ed.c | 37 | ||||
-rw-r--r-- | sys/pc98/pc98/if_fe.c | 43 |
2 files changed, 24 insertions, 56 deletions
diff --git a/sys/pc98/pc98/if_ed.c b/sys/pc98/pc98/if_ed.c index 20d8a91..fa7318c 100644 --- a/sys/pc98/pc98/if_ed.c +++ b/sys/pc98/pc98/if_ed.c @@ -3432,21 +3432,11 @@ ed_ioctl(ifp, command, data) case SIOCADDMULTI: case SIOCDELMULTI: /* - * Update out multicast list. + * Multicast list has changed; set the hardware filter + * accordingly. */ - error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); - - if (error == ENETRESET) { - - /* - * Multicast list has changed; set the hardware filter - * accordingly. - */ - ed_setrcr(sc); - error = 0; - } + ed_setrcr(sc); + error = 0; break; default: @@ -4242,22 +4232,17 @@ ds_getmcaf(sc, mcaf) { register u_int index; register u_char *af = (u_char *) mcaf; - register struct ether_multi *enm; - register struct ether_multistep step; + struct ifmultiaddr *ifma; mcaf[0] = 0; mcaf[1] = 0; - ETHER_FIRST_MULTI(step, &sc->arpcom, enm); - while (enm != NULL) { - if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) { - mcaf[0] = 0xffffffff; - mcaf[1] = 0xffffffff; - return; - } - index = ds_crc(enm->enm_addrlo) >> 26; + for (ifma = sc->arpcom.ac_if.if_multiaddrs.lh_first; ifma; + ifma = ifma->ifma_link.le_next) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + index = ds_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)) + >> 26; af[index >> 3] |= 1 << (index & 7); - - ETHER_NEXT_MULTI(step, enm); } } diff --git a/sys/pc98/pc98/if_fe.c b/sys/pc98/pc98/if_fe.c index 9a33e57..9981c91 100644 --- a/sys/pc98/pc98/if_fe.c +++ b/sys/pc98/pc98/if_fe.c @@ -2893,27 +2893,13 @@ fe_ioctl ( struct ifnet * ifp, int command, caddr_t data ) #ifdef SIOCADDMULTI case SIOCADDMULTI: case SIOCDELMULTI: - { - /* - * Update out multicast list. - */ - struct ifreq * ifr = ( struct ifreq * )data; - - error = ( command == SIOCADDMULTI ) - ? ether_addmulti( ifr, &sc->arpcom ) - : ether_delmulti( ifr, &sc->arpcom ); - - if ( error == ENETRESET ) { - /* - * Multicast list has changed; set the hardware filter - * accordingly. - */ - fe_setmode( sc ); - error = 0; - } - - break; - } + /* + * Multicast list has changed; set the hardware filter + * accordingly. + */ + fe_setmode( sc ); + error = 0; + break; #endif #ifdef SIOCSIFMTU @@ -3225,23 +3211,20 @@ fe_mcaf ( struct fe_softc *sc ) { int index; struct fe_filter filter; - struct ether_multi *enm; - struct ether_multistep step; + struct ifmultiaddr *ifma; filter = fe_filter_nothing; - ETHER_FIRST_MULTI(step, &sc->arpcom, enm); - while ( enm != NULL) { - if ( bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN) ) { - return ( fe_filter_all ); - } - index = fe_hash( enm->enm_addrlo ); + for (ifma = sc->arpcom.ac_if.if_multiaddrs.lh_first; ifma; + ifma = ifma->ifma_link.le_next) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + index = fe_hash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); #if FE_DEBUG >= 4 log( LOG_INFO, "fe%d: hash(%6D) == %d\n", sc->sc_unit, enm->enm_addrlo , ":", index ); #endif filter.data[index >> 3] |= 1 << (index & 7); - ETHER_NEXT_MULTI(step, enm); } return ( filter ); } |