]> git.saurik.com Git - apple/xnu.git/blob - bsd/if/ppc/if_en.h
xnu-344.12.2.tar.gz
[apple/xnu.git] / bsd / if / ppc / if_en.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * MacOSX Mace driver
24 * Defines and device state
25 * Dieter Siegmund (dieter@next.com) Thu Feb 27 18:25:33 PST 1997
26 * - ripped off code from MK/LINUX
27 */
28
29 #define PG_SIZE 0x1000UL
30 #define PG_MASK (PG_SIZE - 1UL)
31
32 #define ETHERMTU 1500
33 #define ETHER_RX_NUM_DBDMA_BUFS 32
34 #define ETHERNET_BUF_SIZE (ETHERMTU + 36)
35 #define ETHER_MIN_PACKET 64
36 #define TX_NUM_DBDMA 6
37
38 #define DBDMA_ETHERNET_EOP 0x40
39
40 typedef struct mace_s {
41 struct arpcom en_arpcom;
42 struct mace_board * ereg; /* ethernet register set address */
43 unsigned char macaddr[NUM_EN_ADDR_BYTES]; /* mac address */
44 int chip_id;
45 dbdma_command_t *rv_dma;
46 dbdma_command_t *tx_dma;
47 unsigned char *rv_dma_area;
48 unsigned char *tx_dma_area;
49 unsigned char multi_mask[8]; /* Multicast mask */
50 unsigned char multi_use[64]; /* Per-mask-bit use count */
51 int rv_tail;
52 int rv_head;
53 int tx_busy;
54 int txintr;
55 int rxintr;
56 int txwatchdog;
57 int ready;
58 int promisc; /* IFF_PROMISC state */
59 } mace_t;
60