if_xereg.h (121099) | if_xereg.h (150989) |
---|---|
1/*- 2 * Copyright (c) 1998, 1999 Scott Mitchell 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 --- 10 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $Id: if_xereg.h,v 1.5 1999/05/20 21:53:58 scott Exp $ | 1/*- 2 * Copyright (c) 1998, 1999 Scott Mitchell 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 --- 10 unchanged lines hidden (view full) --- 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $Id: if_xereg.h,v 1.5 1999/05/20 21:53:58 scott Exp $ |
27 * $FreeBSD: head/sys/dev/xe/if_xereg.h 121099 2003-10-14 22:51:35Z rsm $ | 27 * $FreeBSD: head/sys/dev/xe/if_xereg.h 150989 2005-10-06 08:30:40Z pjd $ |
28 */ 29#ifndef DEV_XE_IF_XEREG_H 30#define DEV_XE_IF_XEREG_H 31 32/* 33 * Register definitions for Xircom PCMCIA Ethernet controllers, based on 34 * Rev. B of the "Dingo" 10/100 controller used in Xircom CEM56 and RealPort 35 * Ethernet/modem cards. The Dingo can be configured to be register --- 527 unchanged lines hidden (view full) --- 563 * received, although higher layers may still need to filter it out. The CRC 564 * calculation is as follows: 565 * 566 * crc = 0xffffffff; 567 * poly = 0x04c11db6; 568 * for (i = 0; i < 6; i++) { 569 * current = mcast_addr[i]; 570 * for (k = 1; k <= 8; k++) { | 28 */ 29#ifndef DEV_XE_IF_XEREG_H 30#define DEV_XE_IF_XEREG_H 31 32/* 33 * Register definitions for Xircom PCMCIA Ethernet controllers, based on 34 * Rev. B of the "Dingo" 10/100 controller used in Xircom CEM56 and RealPort 35 * Ethernet/modem cards. The Dingo can be configured to be register --- 527 unchanged lines hidden (view full) --- 563 * received, although higher layers may still need to filter it out. The CRC 564 * calculation is as follows: 565 * 566 * crc = 0xffffffff; 567 * poly = 0x04c11db6; 568 * for (i = 0; i < 6; i++) { 569 * current = mcast_addr[i]; 570 * for (k = 1; k <= 8; k++) { |
571 * if (crc & 0x80000000); | 571 * if (crc & 0x80000000) |
572 * crc31 = 0x01; 573 * else 574 * crc31 = 0; 575 * bit = crc31 ^ (current & 0x01); 576 * crc <<= 1; 577 * current >>= 1; 578 * if (bit) 579 * crc = (crc ^ poly)|1 --- 121 unchanged lines hidden --- | 572 * crc31 = 0x01; 573 * else 574 * crc31 = 0; 575 * bit = crc31 ^ (current & 0x01); 576 * crc <<= 1; 577 * current >>= 1; 578 * if (bit) 579 * crc = (crc ^ poly)|1 --- 121 unchanged lines hidden --- |