if_malo.c (192468) | if_malo.c (195049) |
---|---|
1/*- 2 * Copyright (c) 2008 Weongyo Jeong <weongyo@freebsd.org> 3 * Copyright (c) 2007 Marvell Semiconductor, Inc. 4 * Copyright (c) 2007 Sam Leffler, Errno Consulting 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 17 unchanged lines hidden (view full) --- 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 27 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29 * THE POSSIBILITY OF SUCH DAMAGES. 30 */ 31 32#include <sys/cdefs.h> 33#ifdef __FreeBSD__ | 1/*- 2 * Copyright (c) 2008 Weongyo Jeong <weongyo@freebsd.org> 3 * Copyright (c) 2007 Marvell Semiconductor, Inc. 4 * Copyright (c) 2007 Sam Leffler, Errno Consulting 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 17 unchanged lines hidden (view full) --- 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 27 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 29 * THE POSSIBILITY OF SUCH DAMAGES. 30 */ 31 32#include <sys/cdefs.h> 33#ifdef __FreeBSD__ |
34__FBSDID("$FreeBSD: head/sys/dev/malo/if_malo.c 192468 2009-05-20 20:00:40Z sam $"); | 34__FBSDID("$FreeBSD: head/sys/dev/malo/if_malo.c 195049 2009-06-26 11:45:06Z rwatson $"); |
35#endif 36 37#include "opt_malo.h" 38 39#include <sys/param.h> 40#include <sys/endian.h> 41#include <sys/kernel.h> 42#include <sys/socket.h> --- 1529 unchanged lines hidden (view full) --- 1572 1573 mp = macs; 1574 nmc = 0; 1575 1576 if (ic->ic_opmode == IEEE80211_M_MONITOR || 1577 (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC))) 1578 goto all; 1579 | 35#endif 36 37#include "opt_malo.h" 38 39#include <sys/param.h> 40#include <sys/endian.h> 41#include <sys/kernel.h> 42#include <sys/socket.h> --- 1529 unchanged lines hidden (view full) --- 1572 1573 mp = macs; 1574 nmc = 0; 1575 1576 if (ic->ic_opmode == IEEE80211_M_MONITOR || 1577 (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC))) 1578 goto all; 1579 |
1580 IF_ADDR_LOCK(ifp); | 1580 if_maddr_rlock(ifp); |
1581 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1582 if (ifma->ifma_addr->sa_family != AF_LINK) 1583 continue; 1584 1585 if (nmc == MALO_HAL_MCAST_MAX) { 1586 ifp->if_flags |= IFF_ALLMULTI; | 1581 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1582 if (ifma->ifma_addr->sa_family != AF_LINK) 1583 continue; 1584 1585 if (nmc == MALO_HAL_MCAST_MAX) { 1586 ifp->if_flags |= IFF_ALLMULTI; |
1587 IF_ADDR_UNLOCK(ifp); | 1587 if_maddr_runlock(ifp); |
1588 goto all; 1589 } 1590 IEEE80211_ADDR_COPY(mp, 1591 LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); 1592 1593 mp += IEEE80211_ADDR_LEN, nmc++; 1594 } | 1588 goto all; 1589 } 1590 IEEE80211_ADDR_COPY(mp, 1591 LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); 1592 1593 mp += IEEE80211_ADDR_LEN, nmc++; 1594 } |
1595 IF_ADDR_UNLOCK(ifp); | 1595 if_maddr_runlock(ifp); |
1596 1597 malo_hal_setmcast(sc->malo_mh, nmc, macs); 1598 1599all: 1600 /* 1601 * XXX we don't know how to set the f/w for supporting 1602 * IFF_ALLMULTI | IFF_PROMISC cases 1603 */ --- 678 unchanged lines hidden --- | 1596 1597 malo_hal_setmcast(sc->malo_mh, nmc, macs); 1598 1599all: 1600 /* 1601 * XXX we don't know how to set the f/w for supporting 1602 * IFF_ALLMULTI | IFF_PROMISC cases 1603 */ --- 678 unchanged lines hidden --- |