mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
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. :-]
This commit is contained in:
parent
75ef4c3a5a
commit
87a6a0f90a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21846
@ -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;
|
||||
struct ifmultiaddr *ifma;
|
||||
|
||||
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--;
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user