Deleted Added
full compact
if_fxp.c (148546) if_fxp.c (148654)
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1995, David Greenman
3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 148546 2005-07-29 22:40:06Z mux $");
31__FBSDID("$FreeBSD: head/sys/dev/fxp/if_fxp.c 148654 2005-08-03 00:18:35Z rwatson $");
32
33/*
34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/endian.h>

--- 2440 unchanged lines hidden (view full) ---

2480{
2481 struct fxp_cb_mcs *mcsp = sc->mcsp;
2482 struct ifnet *ifp = sc->ifp;
2483 struct ifmultiaddr *ifma;
2484 int nmcasts;
2485
2486 nmcasts = 0;
2487 if ((sc->flags & FXP_FLAG_ALL_MCAST) == 0) {
32
33/*
34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/endian.h>

--- 2440 unchanged lines hidden (view full) ---

2480{
2481 struct fxp_cb_mcs *mcsp = sc->mcsp;
2482 struct ifnet *ifp = sc->ifp;
2483 struct ifmultiaddr *ifma;
2484 int nmcasts;
2485
2486 nmcasts = 0;
2487 if ((sc->flags & FXP_FLAG_ALL_MCAST) == 0) {
2488 IF_ADDR_LOCK(ifp);
2488#if __FreeBSD_version < 500000
2489 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
2490#else
2491 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
2492#endif
2493 if (ifma->ifma_addr->sa_family != AF_LINK)
2494 continue;
2495 if (nmcasts >= MAXMCADDR) {
2496 sc->flags |= FXP_FLAG_ALL_MCAST;
2497 nmcasts = 0;
2498 break;
2499 }
2500 bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
2501 &sc->mcsp->mc_addr[nmcasts][0], ETHER_ADDR_LEN);
2502 nmcasts++;
2503 }
2489#if __FreeBSD_version < 500000
2490 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
2491#else
2492 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
2493#endif
2494 if (ifma->ifma_addr->sa_family != AF_LINK)
2495 continue;
2496 if (nmcasts >= MAXMCADDR) {
2497 sc->flags |= FXP_FLAG_ALL_MCAST;
2498 nmcasts = 0;
2499 break;
2500 }
2501 bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
2502 &sc->mcsp->mc_addr[nmcasts][0], ETHER_ADDR_LEN);
2503 nmcasts++;
2504 }
2505 IF_ADDR_UNLOCK(ifp);
2504 }
2505 mcsp->mc_cnt = htole16(nmcasts * ETHER_ADDR_LEN);
2506 return (nmcasts);
2507}
2508
2509/*
2510 * Program the multicast filter.
2511 *

--- 211 unchanged lines hidden ---
2506 }
2507 mcsp->mc_cnt = htole16(nmcasts * ETHER_ADDR_LEN);
2508 return (nmcasts);
2509}
2510
2511/*
2512 * Program the multicast filter.
2513 *

--- 211 unchanged lines hidden ---