if_fe.c (147256) | if_fe.c (148654) |
---|---|
1/*- 2 * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 3 * 4 * This software may be used, modified, copied, distributed, and sold, in 5 * both source and binary form provided that the above copyright, these 6 * terms and the following disclaimer are retained. The name of the author 7 * and/or the contributor may not be used to endorse or promote products 8 * derived from this software without specific prior written permission. --- 7 unchanged lines hidden (view full) --- 16 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION. 17 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 19 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 * SUCH DAMAGE. 21 */ 22 23#include <sys/cdefs.h> | 1/*- 2 * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 3 * 4 * This software may be used, modified, copied, distributed, and sold, in 5 * both source and binary form provided that the above copyright, these 6 * terms and the following disclaimer are retained. The name of the author 7 * and/or the contributor may not be used to endorse or promote products 8 * derived from this software without specific prior written permission. --- 7 unchanged lines hidden (view full) --- 16 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION. 17 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 19 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 * SUCH DAMAGE. 21 */ 22 23#include <sys/cdefs.h> |
24__FBSDID("$FreeBSD: head/sys/dev/fe/if_fe.c 147256 2005-06-10 16:49:24Z brooks $"); | 24__FBSDID("$FreeBSD: head/sys/dev/fe/if_fe.c 148654 2005-08-03 00:18:35Z rwatson $"); |
25 26/* 27 * 28 * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. 29 * Contributed by M. Sekiguchi. <seki@sysrap.cs.fujitsu.co.jp> 30 * 31 * This version is intended to be a generic template for various 32 * MB86960A/MB86965A based Ethernet cards. It currently supports --- 2022 unchanged lines hidden (view full) --- 2055static struct fe_filter 2056fe_mcaf ( struct fe_softc *sc ) 2057{ 2058 int index; 2059 struct fe_filter filter; 2060 struct ifmultiaddr *ifma; 2061 2062 filter = fe_filter_nothing; | 25 26/* 27 * 28 * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. 29 * Contributed by M. Sekiguchi. <seki@sysrap.cs.fujitsu.co.jp> 30 * 31 * This version is intended to be a generic template for various 32 * MB86960A/MB86965A based Ethernet cards. It currently supports --- 2022 unchanged lines hidden (view full) --- 2055static struct fe_filter 2056fe_mcaf ( struct fe_softc *sc ) 2057{ 2058 int index; 2059 struct fe_filter filter; 2060 struct ifmultiaddr *ifma; 2061 2062 filter = fe_filter_nothing; |
2063 IF_ADDR_LOCK(sc->ifp); |
|
2063 TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { 2064 if (ifma->ifma_addr->sa_family != AF_LINK) 2065 continue; 2066 index = ether_crc32_le(LLADDR((struct sockaddr_dl *) 2067 ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; 2068#ifdef FE_DEBUG 2069 if_printf(sc->ifp, "hash(%6D) == %d\n", 2070 enm->enm_addrlo , ":", index); 2071#endif 2072 2073 filter.data[index >> 3] |= 1 << (index & 7); 2074 } | 2064 TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { 2065 if (ifma->ifma_addr->sa_family != AF_LINK) 2066 continue; 2067 index = ether_crc32_le(LLADDR((struct sockaddr_dl *) 2068 ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; 2069#ifdef FE_DEBUG 2070 if_printf(sc->ifp, "hash(%6D) == %d\n", 2071 enm->enm_addrlo , ":", index); 2072#endif 2073 2074 filter.data[index >> 3] |= 1 << (index & 7); 2075 } |
2076 IF_ADDR_UNLOCK(sc->ifp); |
|
2075 return ( filter ); 2076} 2077 2078/* 2079 * Calculate a new "multicast packet filter" and put the 86960 2080 * receiver in appropriate mode. 2081 */ 2082static void --- 155 unchanged lines hidden --- | 2077 return ( filter ); 2078} 2079 2080/* 2081 * Calculate a new "multicast packet filter" and put the 86960 2082 * receiver in appropriate mode. 2083 */ 2084static void --- 155 unchanged lines hidden --- |