if_tx.c (147256) | if_tx.c (148654) |
---|---|
1/*- 2 * Copyright (c) 1997 Semen Ustimenko (semenu@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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997 Semen Ustimenko (semenu@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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/tx/if_tx.c 147256 2005-06-10 16:49:24Z brooks $"); | 28__FBSDID("$FreeBSD: head/sys/dev/tx/if_tx.c 148654 2005-08-03 00:18:35Z rwatson $"); |
29 30/* 31 * EtherPower II 10/100 Fast Ethernet (SMC 9432 serie) 32 * 33 * These cards are based on SMC83c17x (EPIC) chip and one of the various 34 * PHYs (QS6612, AC101 and LXT970 were seen). The media support depends on 35 * card model. All cards support 10baseT/UTP and 100baseTX half- and full- 36 * duplex (SMB9432TX). SMC9432BTX also supports 10baseT/BNC. SMC9432FTX also --- 1367 unchanged lines hidden (view full) --- 1404 return; 1405 } 1406 1407 filter[0] = 0; 1408 filter[1] = 0; 1409 filter[2] = 0; 1410 filter[3] = 0; 1411 | 29 30/* 31 * EtherPower II 10/100 Fast Ethernet (SMC 9432 serie) 32 * 33 * These cards are based on SMC83c17x (EPIC) chip and one of the various 34 * PHYs (QS6612, AC101 and LXT970 were seen). The media support depends on 35 * card model. All cards support 10baseT/UTP and 100baseTX half- and full- 36 * duplex (SMB9432TX). SMC9432BTX also supports 10baseT/BNC. SMC9432FTX also --- 1367 unchanged lines hidden (view full) --- 1404 return; 1405 } 1406 1407 filter[0] = 0; 1408 filter[1] = 0; 1409 filter[2] = 0; 1410 filter[3] = 0; 1411 |
1412 IF_ADDR_LOCK(ifp); |
|
1412#if __FreeBSD_version < 500000 1413 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1414#else 1415 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1416#endif 1417 if (ifma->ifma_addr->sa_family != AF_LINK) 1418 continue; 1419 h = ether_crc32_be(LLADDR((struct sockaddr_dl *) 1420 ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; 1421 filter[h >> 4] |= 1 << (h & 0xF); 1422 } | 1413#if __FreeBSD_version < 500000 1414 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1415#else 1416 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { 1417#endif 1418 if (ifma->ifma_addr->sa_family != AF_LINK) 1419 continue; 1420 h = ether_crc32_be(LLADDR((struct sockaddr_dl *) 1421 ifma->ifma_addr), ETHER_ADDR_LEN) >> 26; 1422 filter[h >> 4] |= 1 << (h & 0xF); 1423 } |
1424 IF_ADDR_UNLOCK(ifp); |
|
1423 1424 CSR_WRITE_4(sc, MC0, filter[0]); 1425 CSR_WRITE_4(sc, MC1, filter[1]); 1426 CSR_WRITE_4(sc, MC2, filter[2]); 1427 CSR_WRITE_4(sc, MC3, filter[3]); 1428} 1429 1430 --- 467 unchanged lines hidden --- | 1425 1426 CSR_WRITE_4(sc, MC0, filter[0]); 1427 CSR_WRITE_4(sc, MC1, filter[1]); 1428 CSR_WRITE_4(sc, MC2, filter[2]); 1429 CSR_WRITE_4(sc, MC3, filter[3]); 1430} 1431 1432 --- 467 unchanged lines hidden --- |