1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 #define CNW_IO_SIZE 0x10
42
43
44 #define CNW_REG_COR 0x0
45 # define CNW_COR_IENA 0x01
46 # define CNW_COR_LVLREQ 0x40
47 #define CNW_REG_CCSR 0x2
48 #define CNW_REG_ASR 0x4
49 # define CNW_ASR_TXBA 0x01
50 # define CNW_ASR_WOC 0x08
51 # define CNW_ASR_TXDN 0x20
52 # define CNW_ASR_RXERR 0x40
53 # define CNW_ASR_RXRDY 0x80
54 #define CNW_REG_IOLOW 0x6
55 #define CNW_REG_IOHI 0x7
56 #define CNW_REG_IOCONTROL 0x8
57 #define CNW_REG_IMR 0xa
58 # define CNW_IMR_IENA 0x02
59 # define CNW_IMR_RFU1 0x10
60 #define CNW_REG_PMR 0xc
61 # define CNW_PMR_RESET 0x80
62 #define CNW_REG_DATA 0xf
63
64
65
66 #define CNW_MEM_ADDR 0x20000
67 #define CNW_MEM_SIZE 0x8000
68
69
70 #define CNW_EREG_CB 0x100
71 #define CNW_EREG_ASCC 0x114
72 #define CNW_EREG_RSER 0x120
73 # define CNW_RSER_RXBIG 0x02
74 # define CNW_RSER_RXCRC 0x04
75 # define CNW_RSER_RXOVERRUN 0x08
76 # define CNW_RSER_RXOVERFLOW 0x10
77 # define CNW_RSER_RXERR 0x40
78 # define CNW_RSER_RXAVAIL 0x80
79 #define CNW_EREG_RSERW 0x124
80 #define CNW_EREG_TSER 0x130
81 # define CNW_TSER_RTRY 0x0f
82 # define CNW_TSER_TXERR 0x10
83 # define CNW_TSER_TXOK 0x20
84 # define CNW_TSER_TXNOAP 0x40
85 # define CNW_TSER_TXGU 0x80
86 # define CNW_TSER_ERROR (CNW_TSER_TXERR | CNW_TSER_TXNOAP | \
87 CNW_TSER_TXGU)
88 #define CNW_EREG_TSERW 0x134
89 #define CNW_EREG_TDP 0x140
90 #define CNW_EREG_LIF 0x14e
91 #define CNW_EREG_RDP 0x150
92 #define CNW_EREG_SPCQ 0x154
93 #define CNW_EREG_SPU 0x155
94 #define CNW_EREG_ISPLQ 0x156
95 #define CNW_EREG_HHC 0x158
96 #define CNW_EREG_PA 0x160
97 #define CNW_EREG_ARW 0x166
98 #define CNW_EREG_MHS 0x16b
99 #define CNW_EREG_NI 0x16e
100 #define CNW_EREG_CRBP 0x17a
101 #define CNW_EREG_EC 0x180
102 #define CNW_EREG_STAT_RXERR 0x184
103 #define CNW_EREG_STAT_FRAME 0x186
104 #define CNW_EREG_STAT_IBEAT 0x188
105 #define CNW_EREG_STAT_RXBUF 0x18e
106 #define CNW_EREG_STAT_RXMULTI 0x190
107 #define CNW_EREG_STAT_TXRETRY 0x192
108 #define CNW_EREG_STAT_TXABORT 0x194
109 #define CNW_EREG_STAT_OBEAT 0x198
110 #define CNW_EREG_STAT_TXOK 0x19a
111 #define CNW_EREG_STAT_TXSENT 0x19c
112
113
114
115
116
117 #define CNW_CMD_NOP 0x00
118 #define CNW_CMD_SRC 0x01
119 # define CNW_RXCONF_RXENA 0x80
120 # define CNW_RXCONF_MAC 0x20
121 # define CNW_RXCONF_PRO 0x10
122 # define CNW_RXCONF_AMP 0x08
123 # define CNW_RXCONF_BCAST 0x04
124 #define CNW_CMD_STC 0x02
125 # define CNW_TXCONF_TXENA 0x80
126 # define CNW_TXCONF_MAC 0x20
127 # define CNW_TXCONF_EUD 0x10
128 # define CNW_TXCONF_KEY 0x02
129 # define CNW_TXCONF_LOOP 0x01
130 #define CNW_CMD_AMA 0x03
131 #define CNW_CMD_DMA 0x04
132 #define CNW_CMD_SAMA 0x05
133 #define CNW_CMD_ER 0x06
134 #define CNW_CMD_DR 0x07
135 #define CNW_CMD_TL 0x08
136 #define CNW_CMD_SRP 0x09
137 #define CNW_CMD_SSK 0x0a
138 #define CNW_CMD_SMD 0x0b
139 #define CNW_CMD_SAPD 0x0c
140 #define CNW_CMD_SSS 0x11
141 #define CNW_CMD_EOC 0x00
142