if_ie.c (181134) | if_ie.c (195049) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993, University of Vermont and State 3 * Agricultural College. 4 * Copyright (c) 1992, 1993, Garrett A. Wollman. 5 * 6 * Portions: 7 * Copyright (c) 1990, 1991, William F. Jolitz 8 * Copyright (c) 1990, The Regents of the University of California --- 37 unchanged lines hidden (view full) --- 46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 * SUCH DAMAGE. 49 * 50 * MAINTAINER: Matthew N. Dodd <winter@jurai.net> 51 */ 52 53#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1992, 1993, University of Vermont and State 3 * Agricultural College. 4 * Copyright (c) 1992, 1993, Garrett A. Wollman. 5 * 6 * Portions: 7 * Copyright (c) 1990, 1991, William F. Jolitz 8 * Copyright (c) 1990, The Regents of the University of California --- 37 unchanged lines hidden (view full) --- 46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 * SUCH DAMAGE. 49 * 50 * MAINTAINER: Matthew N. Dodd <winter@jurai.net> 51 */ 52 53#include <sys/cdefs.h> |
54__FBSDID("$FreeBSD: head/sys/dev/ie/if_ie.c 181134 2008-08-01 21:33:07Z jhb $"); | 54__FBSDID("$FreeBSD: head/sys/dev/ie/if_ie.c 195049 2009-06-26 11:45:06Z rwatson $"); |
55 56/* 57 * Intel 82586 Ethernet chip 58 * Register, bit, and structure definitions. 59 * 60 * Written by GAW with reference to the Clarkson Packet Driver code for this 61 * chip written by Russ Nelson and others. 62 * --- 1607 unchanged lines hidden (view full) --- 1670ie_mc_reset(struct ie_softc *sc) 1671{ 1672 struct ifmultiaddr *ifma; 1673 1674 /* 1675 * Step through the list of addresses. 1676 */ 1677 sc->mcast_count = 0; | 55 56/* 57 * Intel 82586 Ethernet chip 58 * Register, bit, and structure definitions. 59 * 60 * Written by GAW with reference to the Clarkson Packet Driver code for this 61 * chip written by Russ Nelson and others. 62 * --- 1607 unchanged lines hidden (view full) --- 1670ie_mc_reset(struct ie_softc *sc) 1671{ 1672 struct ifmultiaddr *ifma; 1673 1674 /* 1675 * Step through the list of addresses. 1676 */ 1677 sc->mcast_count = 0; |
1678 IF_ADDR_LOCK(sc->ifp); | 1678 if_maddr_rlock(sc->ifp); |
1679 TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { 1680 if (ifma->ifma_addr->sa_family != AF_LINK) 1681 continue; 1682 1683 /* XXX - this is broken... */ 1684 if (sc->mcast_count >= MAXMCAST) { 1685 sc->ifp->if_flags |= IFF_ALLMULTI; 1686 if (sc->ifp->if_flags & IFF_UP) 1687 ieinit_locked(sc); 1688 goto setflag; 1689 } 1690 bcopy(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), 1691 &(sc->mcast_addrs[sc->mcast_count]), 6); 1692 sc->mcast_count++; 1693 } | 1679 TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { 1680 if (ifma->ifma_addr->sa_family != AF_LINK) 1681 continue; 1682 1683 /* XXX - this is broken... */ 1684 if (sc->mcast_count >= MAXMCAST) { 1685 sc->ifp->if_flags |= IFF_ALLMULTI; 1686 if (sc->ifp->if_flags & IFF_UP) 1687 ieinit_locked(sc); 1688 goto setflag; 1689 } 1690 bcopy(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), 1691 &(sc->mcast_addrs[sc->mcast_count]), 6); 1692 sc->mcast_count++; 1693 } |
1694 IF_ADDR_UNLOCK(sc->ifp); | 1694 if_maddr_runlock(sc->ifp); |
1695 1696setflag: 1697 sc->want_mcsetup = 1; 1698} 1699 1700 1701#ifdef DEBUG 1702static void --- 106 unchanged lines hidden --- | 1695 1696setflag: 1697 sc->want_mcsetup = 1; 1698} 1699 1700 1701#ifdef DEBUG 1702static void --- 106 unchanged lines hidden --- |