if_de.c (72012) | if_de.c (72084) |
---|---|
1/* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */ 2 | 1/* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */ 2 |
3/* $FreeBSD: head/sys/dev/de/if_de.c 72012 2001-02-04 16:08:18Z phk $ */ | 3/* $FreeBSD: head/sys/dev/de/if_de.c 72084 2001-02-06 10:12:15Z phk $ */ |
4 5/*- 6 * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: --- 2995 unchanged lines hidden (view full) --- 3007 sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN; 3008 sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED; 3009#if defined(IFF_ALLMULTI) 3010 if (sc->tulip_if.if_flags & IFF_ALLMULTI) 3011 sc->tulip_flags |= TULIP_ALLMULTI ; 3012#endif 3013 3014 multicnt = 0; | 4 5/*- 6 * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: --- 2995 unchanged lines hidden (view full) --- 3007 sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN; 3008 sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED; 3009#if defined(IFF_ALLMULTI) 3010 if (sc->tulip_if.if_flags & IFF_ALLMULTI) 3011 sc->tulip_flags |= TULIP_ALLMULTI ; 3012#endif 3013 3014 multicnt = 0; |
3015 LIST_FOREACH(ifma, &sc->tulip_if.if_multiaddrs, ifma_link) { | 3015 TAILQ_FOREACH(ifma, &sc->tulip_if.if_multiaddrs, ifma_link) { |
3016 3017 if (ifma->ifma_addr->sa_family == AF_LINK) 3018 multicnt++; 3019 } 3020 3021 sc->tulip_if.if_start = tulip_ifstart; /* so the setup packet gets queued */ 3022 if (multicnt > 14) { 3023 u_int32_t *sp = sc->tulip_setupdata; --- 11 unchanged lines hidden (view full) --- 3035 sc->tulip_flags |= TULIP_WANTHASHPERFECT; 3036 /* 3037 * If we have more than 14 multicasts, we have 3038 * go into hash perfect mode (512 bit multicast 3039 * hash and one perfect hardware). 3040 */ 3041 bzero(sc->tulip_setupdata, sizeof(sc->tulip_setupdata)); 3042 | 3016 3017 if (ifma->ifma_addr->sa_family == AF_LINK) 3018 multicnt++; 3019 } 3020 3021 sc->tulip_if.if_start = tulip_ifstart; /* so the setup packet gets queued */ 3022 if (multicnt > 14) { 3023 u_int32_t *sp = sc->tulip_setupdata; --- 11 unchanged lines hidden (view full) --- 3035 sc->tulip_flags |= TULIP_WANTHASHPERFECT; 3036 /* 3037 * If we have more than 14 multicasts, we have 3038 * go into hash perfect mode (512 bit multicast 3039 * hash and one perfect hardware). 3040 */ 3041 bzero(sc->tulip_setupdata, sizeof(sc->tulip_setupdata)); 3042 |
3043 LIST_FOREACH(ifma, &sc->tulip_if.if_multiaddrs, ifma_link) { | 3043 TAILQ_FOREACH(ifma, &sc->tulip_if.if_multiaddrs, ifma_link) { |
3044 3045 if (ifma->ifma_addr->sa_family != AF_LINK) 3046 continue; 3047 3048 hash = tulip_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); 3049#if BYTE_ORDER == BIG_ENDIAN 3050 sp[hash >> 4] |= bswap32(1 << (hash & 0xF)); 3051#else --- 33 unchanged lines hidden (view full) --- 3085 } 3086 if ((sc->tulip_flags & (TULIP_WANTHASHPERFECT|TULIP_WANTHASHONLY)) == 0) { 3087 u_int32_t *sp = sc->tulip_setupdata; 3088 int idx = 0; 3089 if ((sc->tulip_flags & TULIP_ALLMULTI) == 0) { 3090 /* 3091 * Else can get perfect filtering for 16 addresses. 3092 */ | 3044 3045 if (ifma->ifma_addr->sa_family != AF_LINK) 3046 continue; 3047 3048 hash = tulip_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); 3049#if BYTE_ORDER == BIG_ENDIAN 3050 sp[hash >> 4] |= bswap32(1 << (hash & 0xF)); 3051#else --- 33 unchanged lines hidden (view full) --- 3085 } 3086 if ((sc->tulip_flags & (TULIP_WANTHASHPERFECT|TULIP_WANTHASHONLY)) == 0) { 3087 u_int32_t *sp = sc->tulip_setupdata; 3088 int idx = 0; 3089 if ((sc->tulip_flags & TULIP_ALLMULTI) == 0) { 3090 /* 3091 * Else can get perfect filtering for 16 addresses. 3092 */ |
3093 LIST_FOREACH(ifma, &sc->tulip_if.if_multiaddrs, ifma_link) { | 3093 TAILQ_FOREACH(ifma, &sc->tulip_if.if_multiaddrs, ifma_link) { |
3094 if (ifma->ifma_addr->sa_family != AF_LINK) 3095 continue; 3096 addrp = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); 3097#if BYTE_ORDER == BIG_ENDIAN 3098 *sp++ = ((u_int16_t *) addrp)[0] << 16; 3099 *sp++ = ((u_int16_t *) addrp)[1] << 16; 3100 *sp++ = ((u_int16_t *) addrp)[2] << 16; 3101#else --- 2169 unchanged lines hidden --- | 3094 if (ifma->ifma_addr->sa_family != AF_LINK) 3095 continue; 3096 addrp = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); 3097#if BYTE_ORDER == BIG_ENDIAN 3098 *sp++ = ((u_int16_t *) addrp)[0] << 16; 3099 *sp++ = ((u_int16_t *) addrp)[1] << 16; 3100 *sp++ = ((u_int16_t *) addrp)[2] << 16; 3101#else --- 2169 unchanged lines hidden --- |