if_sn.c (71060) | if_sn.c (71999) |
---|---|
1/* 2 * Copyright (c) 1996 Gardner Buchanan <gbuchanan@shl.com> 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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 1996 Gardner Buchanan <gbuchanan@shl.com> 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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/dev/sn/if_sn.c 71060 2001-01-15 12:01:14Z toshi $ | 31 * $FreeBSD: head/sys/dev/sn/if_sn.c 71999 2001-02-04 13:13:25Z phk $ |
32 */ 33 34/* 35 * This is a driver for SMC's 9000 series of Ethernet adapters. 36 * 37 * This FreeBSD driver is derived from the smc9194 Linux driver by 38 * Erik Stahlman and is Copyright (C) 1996 by Erik Stahlman. 39 * This driver also shamelessly borrows from the FreeBSD ep driver --- 1416 unchanged lines hidden (view full) --- 1456{ 1457 int i; 1458 register u_int index, index2; 1459 register u_char *af = (u_char *) mcf; 1460 struct ifmultiaddr *ifma; 1461 1462 bzero(mcf, MCFSZ); 1463 | 32 */ 33 34/* 35 * This is a driver for SMC's 9000 series of Ethernet adapters. 36 * 37 * This FreeBSD driver is derived from the smc9194 Linux driver by 38 * Erik Stahlman and is Copyright (C) 1996 by Erik Stahlman. 39 * This driver also shamelessly borrows from the FreeBSD ep driver --- 1416 unchanged lines hidden (view full) --- 1456{ 1457 int i; 1458 register u_int index, index2; 1459 register u_char *af = (u_char *) mcf; 1460 struct ifmultiaddr *ifma; 1461 1462 bzero(mcf, MCFSZ); 1463 |
1464 for (ifma = ac->ac_if.if_multiaddrs.lh_first; ifma; 1465 ifma = ifma->ifma_link.le_next) { | 1464 for (ifma = LIST_FIRST(&ac->ac_if.if_multiaddrs); ifma; 1465 ifma = LIST_NEXT(ifma, ifma_link)) { |
1466 if (ifma->ifma_addr->sa_family != AF_LINK) 1467 return 0; 1468 index = smc_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)) & 0x3f; 1469 index2 = 0; 1470 for (i = 0; i < 6; i++) { 1471 index2 <<= 1; 1472 index2 |= (index & 0x01); 1473 index >>= 1; --- 24 unchanged lines hidden --- | 1466 if (ifma->ifma_addr->sa_family != AF_LINK) 1467 return 0; 1468 index = smc_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)) & 0x3f; 1469 index2 = 0; 1470 for (i = 0; i < 6; i++) { 1471 index2 <<= 1; 1472 index2 |= (index & 0x01); 1473 index >>= 1; --- 24 unchanged lines hidden --- |