Deleted Added
full compact
if_ae.c (196970) if_ae.c (197627)
1/*-
2 * Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * Driver for Attansic Technology Corp. L2 FastEthernet adapter.
26 *
27 * This driver is heavily based on age(4) Attansic L1 driver by Pyun YongHyeon.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * Driver for Attansic Technology Corp. L2 FastEthernet adapter.
26 *
27 * This driver is heavily based on age(4) Attansic L1 driver by Pyun YongHyeon.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/ae/if_ae.c 196970 2009-09-08 13:19:05Z phk $");
31__FBSDID("$FreeBSD: head/sys/dev/ae/if_ae.c 197627 2009-09-29 23:03:16Z yongari $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/bus.h>
36#include <sys/endian.h>
37#include <sys/kernel.h>
38#include <sys/malloc.h>
39#include <sys/mbuf.h>

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

2072 /*
2073 * Load multicast tables.
2074 */
2075 bzero(mchash, sizeof(mchash));
2076 if_maddr_rlock(ifp);
2077 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
2078 if (ifma->ifma_addr->sa_family != AF_LINK)
2079 continue;
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/bus.h>
36#include <sys/endian.h>
37#include <sys/kernel.h>
38#include <sys/malloc.h>
39#include <sys/mbuf.h>

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

2072 /*
2073 * Load multicast tables.
2074 */
2075 bzero(mchash, sizeof(mchash));
2076 if_maddr_rlock(ifp);
2077 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
2078 if (ifma->ifma_addr->sa_family != AF_LINK)
2079 continue;
2080 crc = ether_crc32_le(LLADDR((struct sockaddr_dl *)
2080 crc = ether_crc32_be(LLADDR((struct sockaddr_dl *)
2081 ifma->ifma_addr), ETHER_ADDR_LEN);
2082 mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
2083 }
2084 if_maddr_runlock(ifp);
2085 AE_WRITE_4(sc, AE_REG_MHT0, mchash[0]);
2086 AE_WRITE_4(sc, AE_REG_MHT1, mchash[1]);
2087 AE_WRITE_4(sc, AE_MAC_REG, rxcfg);
2088}

--- 170 unchanged lines hidden ---
2081 ifma->ifma_addr), ETHER_ADDR_LEN);
2082 mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
2083 }
2084 if_maddr_runlock(ifp);
2085 AE_WRITE_4(sc, AE_REG_MHT0, mchash[0]);
2086 AE_WRITE_4(sc, AE_REG_MHT1, mchash[1]);
2087 AE_WRITE_4(sc, AE_MAC_REG, rxcfg);
2088}

--- 170 unchanged lines hidden ---