1 /* $NetBSD: if_uaxreg.h,v 1.1 2003/02/16 17:18:47 augustss Exp $ */
2
3 /*
4 * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net).
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 #define UAX_CONFIG_NO 1
40 #define UAX_IFACE_IDX 0
41
42 #define UAX_MAX_PHYS 2
43
44 #define UAX_TX_TIMEOUT 2000 /* ms */
45 #define UAX_BUFSZ (ETHER_MAX_LEN - ETHER_CRC_LEN)
46
47 /* Requests */
48 #define UAX_READ_SRAM 0x02
49 #define UAX_WRITE_RX_SRAM 0x03
50 #define UAX_WRITE_TX_SRAM 0x04
51 #define UAX_SOFTWARE_MII 0x06
52 #define UAX_READ_MII_REG 0x07
53 #define UAX_WRITE_MII_REG 0x08
54 #define UAX_READ_MII_OPMODE 0x09
55 #define UAX_HARDWARE_MII 0x0a
56 #define UAX_READ_SROM 0x0b
57 #define UAX_WRITE_SROM 0x0c
58 #define UAX_WRITE_SROM_ENABLE 0x0d
59 #define UAX_WRITE_SROM_DISABLE 0x0e
60 #define UAX_READ_RX_CTRL 0x0f
61 #define UAX_WRITE_RX_CTRL 0x10
62 #define UAX_RX_PROMISCUOUS 0x01
63 #define UAX_RX_ALL_MULTICAST 0x02
64 #define UAX_RX_DIRECTED 0x04
65 #define UAX_RX_BROADCAST 0x08
66 #define UAX_RX_MULTICAST 0x10
67 #define UAX_RX_ALTERNATE 0x80
68 #define UAX_READ_IPGS 0x11
69 #define UAX_WRITE_IPG 0x12
70 #define UAX_WRITE_IPG1 0x13
71 #define UAX_WRITE_IPG2 0x14
72 #define UAX_READ_MULTI_FILTER 0x15
73 #define UAX_MULTI_FILTER_SIZE 8
74 #define UAX_WRITE_MULTI_FILTER 0x16
75 #define UAX_READ_NODEID 0x17
76 #define UAX_READ_PHYID 0x19
77 #define UAX_GET_PHY(r) ((r) & 0x1f)
78 #define UAX_GET_PHY_TYPE(r) (((r) >> 5) & 0x07)
79 #define UAX_READ_MEDIUM_STATUS 0x1a
80 #define UAX_WRITE_MEDIUM_STATUS 0x1b
81 #define UAX_GET_MONITOR_MODE 0x1c
82 #define UAX_SET_MONITOR_MODE 0x1d
83 #define UAX_READ_GPIOS 0x1e
84 #define UAX_WRITE_GPIOS 0x1f
85
86 #define UAX_INTR_PKTLEN 8
87 #define UAX_INTR_INTERVAL 100 /* XXX */
88 struct uax_intrpkt {
89 u_int8_t uax_intrdata[UAX_INTR_PKTLEN];
90 };
91
Cache object: 09e1bdab499416ae481f68d80d84d0f8
|