diff options
author | joerg <joerg@FreeBSD.org> | 1997-01-18 13:03:21 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-01-18 13:03:21 +0000 |
commit | f9238d2de0a8f384b16976d1ffb249de99e34b19 (patch) | |
tree | 07921806b8f839d49ba4ac1dcdd2d6b5a3b85f16 /sys | |
parent | 57da64ce1cf162a910ed9c739dc2b820e9fd8e2b (diff) | |
download | FreeBSD-src-f9238d2de0a8f384b16976d1ffb249de99e34b19.zip FreeBSD-src-f9238d2de0a8f384b16976d1ffb249de99e34b19.tar.gz |
Catch up with the moving target: merge the change from rev 1.19 of the
now dead sys/pci/if_pdq.c which has been committed about by the same
time i made my tests with Matt's code.
LINT should compile now again.
Well, that's a clear case where ``CVS writer locks'' would certainly
(not) have helped. :-]
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pdq/pdq_ifsubr.c | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c index b6223fb..8efa8c7 100644 --- a/sys/dev/pdq/pdq_ifsubr.c +++ b/sys/dev/pdq/pdq_ifsubr.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pdq_ifsubr.c,v 1.1.1.1 1997/01/17 23:19:49 joerg Exp $ + * $Id: pdq_ifsubr.c,v 1.2 1997/01/17 23:54:32 joerg Exp $ * */ @@ -250,17 +250,19 @@ pdq_os_addr_fill( size_t num_addrs) { pdq_softc_t *sc = (pdq_softc_t *) pdq->pdq_os_ctx; - struct ether_multistep step; - struct ether_multi *enm; - - ETHER_FIRST_MULTI(step, &sc->sc_ac, enm); - while (enm != NULL && num_addrs > 0) { - ((u_short *) addr->lanaddr_bytes)[0] = ((u_short *) enm->enm_addrlo)[0]; - ((u_short *) addr->lanaddr_bytes)[1] = ((u_short *) enm->enm_addrlo)[1]; - ((u_short *) addr->lanaddr_bytes)[2] = ((u_short *) enm->enm_addrlo)[2]; - ETHER_NEXT_MULTI(step, enm); - addr++; - num_addrs--; + struct ifmultiaddr *ifma; + + for (ifma = sc->sc_if.if_multiaddrs.lh_first; ifma && num_addrs > 0; + ifma = ifma->ifma_link.le_next) { + char *mcaddr; + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + mcaddr = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); + ((u_short *) addr->lanaddr_bytes)[0] = ((u_short *) mcaddr)[0]; + ((u_short *) addr->lanaddr_bytes)[1] = ((u_short *) mcaddr)[1]; + ((u_short *) addr->lanaddr_bytes)[2] = ((u_short *) mcaddr)[2]; + addr++; + num_addrs--; } } @@ -331,22 +333,14 @@ pdq_ifioctl( } case SIOCADDMULTI: - case SIOCDELMULTI: { - /* - * Update multicast listeners - */ - if (cmd == SIOCADDMULTI) - error = ether_addmulti((struct ifreq *)data, &sc->sc_ac); - else - error = ether_delmulti((struct ifreq *)data, &sc->sc_ac); - - if (error == ENETRESET) { + case SIOCDELMULTI: + /* + * Update multicast listeners + */ if (sc->sc_if.if_flags & IFF_RUNNING) - pdq_run(sc->sc_pdq); + pdq_run(sc->sc_pdq); error = 0; - } - break; - } + break; #if defined(SIOCSIFMTU) #if !defined(ifr_mtu) @@ -398,6 +392,8 @@ pdq_ifattach( ifp->if_ioctl = pdq_ifioctl; ifp->if_output = fddi_output; ifp->if_start = pdq_ifstart; +#warning "Implement fddi_resolvemulti!" +/* ifp->if_resolvemulti = ether_resolvemulti; XXX */ if_attach(ifp); fddi_ifattach(ifp); |