Reverted refactoring of 'interrogate' cmds to 'query'
[acx-mac80211.git] / acx_mmio.h
bloba02900e091d19cac777c35be0ac72d697dc836bf
1 #ifndef _ACX_MMIO_H_
2 #define _ACX_MMIO_H_
4 /*
5 * acx_mmio.h: querying/configuration commands and on-chip (EEPROM?) registers.
6 * Differ depending on the chipset and bus type (PCI or USB - it appears that
7 * VLYNQ behaves like PCI most of the time - most).
9 * Copyright (c) 2003, 2008 ACX100 driver project.
11 * This file is licensed under the GPLv2. See the README file for more
12 * information.
14 * Part of the original comments can be seen between the dash lines below. I
15 * just cannot make sense of the first part right now.
17 * See also the file README.unknowncommands: it contains other commands gathered
18 * from snooping/anyothermeans of unhandled TI chipsets. Note that what was
19 * called ACX.._IE_ before is now called ACX.._REG_, because what we talk about
20 * here are really registers.
22 * ----------------------------------------------------------------------------
23 * NB: length includes JUST the data part of the IE
24 * (does not include size of the (type,len) pair)
26 * TODO: seems that acx100, acx100usb, acx111 have some differences,
27 * fix code with regard to this!
28 * ----------------------------------------------------------------------------
33 * COMMANDS
36 /*
37 * Original comment:
39 * ----------------------------------------------------------------------------
40 * can be found in table cmdTable in firmware "Rev. 1.5.0" (FW150)
41 * ----------------------------------------------------------------------------
44 #define ACX1xx_CMD_RESET 0x00
45 #define ACX1xx_CMD_INTERROGATE 0x01
46 #define ACX1xx_CMD_CONFIGURE 0x02
47 #define ACX1xx_CMD_ENABLE_RX 0x03
48 #define ACX1xx_CMD_ENABLE_TX 0x04
49 #define ACX1xx_CMD_DISABLE_RX 0x05
50 #define ACX1xx_CMD_DISABLE_TX 0x06
51 #define ACX1xx_CMD_FLUSH_QUEUE 0x07
52 #define ACX1xx_CMD_SCAN 0x08
53 #define ACX1xx_CMD_STOP_SCAN 0x09
54 #define ACX1xx_CMD_CONFIG_TIM 0x0a
55 #define ACX1xx_CMD_JOIN 0x0b
56 #define ACX1xx_CMD_WEP_MGMT 0x0c
59 * FIXME: get rid of this? We don't have any old firmware lying around, do we?
61 #ifdef OLD_FIRMWARE_VERSIONS
62 /* mapped to unknownCMD in FW150 */
63 #define ACX100_CMD_HALT 0x0e
64 #else
65 #define ACX1xx_CMD_MEM_READ 0x0d
66 #define ACX1xx_CMD_MEM_WRITE 0x0e
67 #endif
68 #define ACX1xx_CMD_SLEEP 0x0f
69 #define ACX1xx_CMD_WAKE 0x10
70 /* mapped to unknownCMD in FW150 */
71 #define ACX1xx_CMD_UNKNOWN_11 0x11
72 #define ACX100_CMD_INIT_MEMORY 0x12
73 /* new firmware? TNETW1450? */
74 #define ACX1FF_CMD_DISABLE_RADIO 0x12
75 #define ACX1xx_CMD_CONFIG_BEACON 0x13
76 #define ACX1xx_CMD_CONFIG_PROBE_RESPONSE 0x14
77 #define ACX1xx_CMD_CONFIG_NULL_DATA 0x15
78 #define ACX1xx_CMD_CONFIG_PROBE_REQUEST 0x16
79 #define ACX1xx_CMD_FCC_TEST 0x17
80 #define ACX1xx_CMD_RADIOINIT 0x18
81 #define ACX111_CMD_RADIOCALIB 0x19
82 /* new firmware? TNETW1450? */
83 #define ACX1FF_CMD_NOISE_HISTOGRAM 0x1c
84 /* new firmware? TNETW1450? */
85 #define ACX1FF_CMD_RX_RESET 0x1d
86 /* new firmware? TNETW1450? */
87 #define ACX1FF_CMD_LNA_CONTROL 0x20
88 /* new firmware? TNETW1450? */
89 #define ACX1FF_CMD_CONTROL_DBG_TRACE 0x21
93 * REGISTERS
95 * Note that some of them are read/write, and others are read-only.
97 * Original comment, whatever it means:
99 * ----------------------------------------------------------------------------
100 * these are handled by real_cfgtable in firmware "Rev 1.5.0" (FW150)
101 * ----------------------------------------------------------------------------
103 //DEF_IE(1xx_IE_UNKNOWN_00 ,0x0000, -1); /* mapped to cfgInvalid in FW150 */
104 #define ACX100_REG_ACX_TIMER (0x0001)
105 #define ACX100_REG_ACX_TIMER_LEN (0x10)
106 /* TNETW1450: length 0x18!! */
107 #define ACX1xx_REG_POWER_MGMT (0x0002)
108 #define ACX1xx_REG_POWER_MGMT_LEN (0x06)
109 #define ACX1xx_REG_QUEUE_CONFIG (0x0003)
110 #define ACX1xx_REG_QUEUE_CONFIG_LEN (0x1c)
111 #define ACX100_REG_BLOCK_SIZE (0x0004)
112 #define ACX100_REG_BLOCK_SIZE_LEN (0x02)
113 /* later firmware versions only? */
114 #define ACX1FF_REG_SLOT_TIME (0x0004)
115 #define ACX1FF_REG_SLOT_TIME_LEN (0x08)
116 #define ACX1xx_REG_MEMORY_CONFIG_OPTIONS (0x0005)
117 #define ACX1xx_REG_MEMORY_CONFIG_OPTIONS_LEN (0x14)
118 #define ACX1FF_REG_QUEUE_HEAD (0x0005)
119 /* FIXME: length? */
120 #define ACX1FF_REG_QUEUE_HEAD_LEN (0x14)
121 /* TNETW1450: length 2 */
122 #define ACX1xx_REG_RATE_FALLBACK (0x0006)
123 #define ACX1xx_REG_RATE_FALLBACK_LEN (0x01)
124 #define ACX100_REG_WEP_OPTIONS (0x0007)
125 #define ACX100_REG_WEP_OPTIONS_LEN (0x03)
126 #define ACX111_REG_RADIO_BAND (0x0007)
127 #define ACX111_REG_RADIO_BAND_LEN (-1)
128 /* later firmware versions; TNETW1450 only? */
129 #define ACX1FF_REG_TIMING_CFG (0x0007)
130 #define ACX1FF_REG_TIMING_CFG_LEN (-1)
131 /* huh? */
132 #define ACX100_REG_SSID (0x0008)
133 #define ACX100_REG_SSID_LEN (0x20)
134 /* huh? TNETW1450 has length 0x40!! */
135 #define ACX1xx_REG_MEMORY_MAP (0x0008)
136 #define ACX1xx_REG_MEMORY_MAP_LEN (0x28)
137 /* mapped to cfgInvalid in FW150 */
138 #define ACX1xx_REG_SCAN_STATUS (0x0009)
139 #define ACX1xx_REG_SCAN_STATUS_LEN (0x04)
140 #define ACX1xx_REG_ASSOC_ID (0x000a)
141 #define ACX1xx_REG_ASSOC_ID_LEN (0x02)
142 /* mapped to cfgInvalid in FW150 */
143 #define ACX1xx_REG_UNKNOWN_0B (0x000b)
144 #define ACX1xx_REG_UNKNOWN_0B_LEN (-1)
145 /* later firmware versions; TNETW1450 only? */
146 #define ACX1FF_REG_TX_POWER_LEVEL_TABLE (0x000b)
147 #define ACX1FF_REG_TX_POWER_LEVEL_TABLE_LEN (0x18)
148 /* very small implementation in FW150! */
149 #define ACX100_REG_UNKNOWN_0C (0x000c)
150 #define ACX100_REG_UNKNOWN_0C_LEN (-1)
152 * ACX100 has an equivalent struct in the cmd mailbox directly after reset.
153 * 0x14c seems extremely large, will trash stack on failure (memset!)
154 * in case of small input struct --> OOPS!
156 #define ACX111_REG_CONFIG_OPTIONS (0x000c)
157 #define ACX111_REG_CONFIG_OPTIONS_LEN (0x14c)
158 #define ACX1xx_REG_FWREV (0x000d)
159 #define ACX1xx_REG_FWREV_LEN (0x18)
160 #define ACX1xx_REG_FCS_ERROR_COUNT (0x000e)
161 #define ACX1xx_REG_FCS_ERROR_COUNT_LEN (0x04)
162 #define ACX1xx_REG_MEDIUM_USAGE (0x000f)
163 #define ACX1xx_REG_MEDIUM_USAGE_LEN (0x08)
164 #define ACX1xx_REG_RXCONFIG (0x0010)
165 #define ACX1xx_REG_RXCONFIG_LEN (0x04)
166 /* NONBINARY: large implementation in FW150! link quality readings or so? */
167 #define ACX100_REG_UNKNOWN_11 (0x0011)
168 #define ACX100_REG_UNKNOWN_11_LEN (-1)
169 #define ACX111_REG_QUEUE_THRESH (0x0011)
170 #define ACX111_REG_QUEUE_THRESH_LEN (-1)
171 /* NONBINARY: VERY large implementation in FW150!! */
172 #define ACX100_REG_UNKNOWN_12 (0x0012)
173 #define ACX100_REG_UNKNOWN_12_LEN (-1)
174 #define ACX111_REG_BSS_POWER_SAVE (0x0012)
175 #define ACX111_REG_BSS_POWER_SAVE_LEN (/* -1 */ 2)
176 /* TNETW1450: length 0x134!! */
177 #define ACX1xx_REG_FIRMWARE_STATISTICS (0x0013)
178 #define ACX1xx_REG_FIRMWARE_STATISTICS_LEN (0x9c)
179 /* later firmware versions, TNETW1450 only? */
180 #define ACX1FF_REG_RX_INTR_CONFIG (0x0014)
181 #define ACX1FF_REG_RX_INTR_CONFIG_LEN (0x14)
182 #define ACX1xx_REG_FEATURE_CONFIG (0x0015)
183 #define ACX1xx_REG_FEATURE_CONFIG_LEN (0x08)
184 /* for rekeying. really len=4?? */
185 #define ACX111_REG_KEY_CHOOSE (0x0016)
186 #define ACX111_REG_KEY_CHOOSE_LEN (0x04)
187 /* later firmware versions, TNETW1450 only? */
188 #define ACX1FF_REG_MISC_CONFIG_TABLE (0x0017)
189 #define ACX1FF_REG_MISC_CONFIG_TABLE_LEN (0x04)
190 /* later firmware versions, TNETW1450 only? */
191 #define ACX1FF_REG_WONE_CONFIG (0x0018)
192 #define ACX1FF_REG_WONE_CONFIG_LEN (-1)
193 /* later firmware versions, TNETW1450 only? */
194 #define ACX1FF_REG_TID_CONFIG (0x001a)
195 #define ACX1FF_REG_TID_CONFIG_LEN (0x2c)
196 /* later firmware versions, TNETW1450 only? */
197 #define ACX1FF_REG_CALIB_ASSESSMENT (0x001e)
198 #define ACX1FF_REG_CALIB_ASSESSMENT_LEN (0x04)
199 /* later firmware versions, TNETW1450 only? */
200 #define ACX1FF_REG_BEACON_FILTER_OPTIONS (0x001f)
201 #define ACX1FF_REG_BEACON_FILTER_OPTIONS_LEN (0x02)
202 /* later firmware versions, TNETW1450 only? */
203 #define ACX1FF_REG_LOW_RSSI_THRESH_OPT (0x0020)
204 #define ACX1FF_REG_LOW_RSSI_THRESH_OPT_LEN (0x04)
205 /* later firmware versions, TNETW1450 only? */
206 #define ACX1FF_REG_NOISE_HISTOGRAM_RESULTS (0x0021)
207 #define ACX1FF_REG_NOISE_HISTOGRAM_RESULTS_LEN (0x30)
208 /* later firmware versions, TNETW1450 only? */
209 #define ACX1FF_REG_PACKET_DETECT_THRESH (0x0023)
210 #define ACX1FF_REG_PACKET_DETECT_THRESH_LEN (0x04)
211 /* later firmware versions, TNETW1450 only? */
212 #define ACX1FF_REG_TX_CONFIG_OPTIONS (0x0024)
213 #define ACX1FF_REG_TX_CONFIG_OPTIONS_LEN (0x04)
214 /* later firmware versions, TNETW1450 only? */
215 #define ACX1FF_REG_CCA_THRESHOLD (0x0025)
216 #define ACX1FF_REG_CCA_THRESHOLD_LEN (0x02)
217 /* later firmware versions, TNETW1450 only? */
218 #define ACX1FF_REG_EVENT_MASK (0x0026)
219 #define ACX1FF_REG_EVENT_MASK_LEN (0x08)
220 /* later firmware versions, TNETW1450 only? */
221 #define ACX1FF_REG_DTIM_PERIOD (0x0027)
222 #define ACX1FF_REG_DTIM_PERIOD_LEN (0x02)
223 /* later firmware versions; maybe TNETW1450 only? */
224 #define ACX1FF_REG_ACI_CONFIG_SET (0x0029)
225 #define ACX1FF_REG_ACI_CONFIG_SET_LEN (0x06)
226 /* later firmware versions; maybe TNETW1450 only? */
227 #define ACX1FF_REG_EEPROM_VER (0x0030)
228 #define ACX1FF_REG_EEPROM_VER_LEN (0x04)
229 #define ACX1xx_REG_DOT11_STATION_ID (0x1001)
230 #define ACX1xx_REG_DOT11_STATION_ID_LEN (0x06)
231 /* mapped to cfgInvalid in FW150 */
232 #define ACX100_REG_DOT11_UNKNOWN_1002 (0x1002)
233 #define ACX100_REG_DOT11_UNKNOWN_1002_LEN (-1)
234 /* mapped to cfgInvalid in FW150; TNETW1450 has length 2!! */
235 #define ACX111_REG_DOT11_FRAG_THRESH (0x1002)
236 #define ACX111_REG_DOT11_FRAG_THRESH_LEN (-1)
237 /* mapped to cfgInvalid in FW150 */
238 #define ACX100_REG_DOT11_BEACON_PERIOD (0x1003)
239 #define ACX100_REG_DOT11_BEACON_PERIOD_LEN (0x02)
240 /* mapped to cfgInvalid in FW150 */
241 #define ACX1xx_REG_DOT11_DTIM_PERIOD (0x1004)
242 #define ACX1xx_REG_DOT11_DTIM_PERIOD_LEN (-1)
243 /* later firmware versions; maybe TNETW1450 only? */
244 #define ACX1FF_REG_DOT11_MAX_RX_LIFETIME (0x1004)
245 #define ACX1FF_REG_DOT11_MAX_RX_LIFETIME_LEN (-1)
246 /* TNETW1450: length 2 */
247 #define ACX1xx_REG_DOT11_SHORT_RETRY_LIMIT (0x1005)
248 #define ACX1xx_REG_DOT11_SHORT_RETRY_LIMIT_LEN (0x01)
249 /* TNETW1450: length 2 */
250 #define ACX1xx_REG_DOT11_LONG_RETRY_LIMIT (0x1006)
251 #define ACX1xx_REG_DOT11_LONG_RETRY_LIMIT_LEN (0x01)
252 /* configure default keys; TNETW1450 has length 0x24!! */
253 #define ACX100_REG_DOT11_WEP_DEFAULT_KEY_WRITE (0x1007)
254 #define ACX100_REG_DOT11_WEP_DEFAULT_KEY_WRITE_LEN (0x20)
255 #define ACX1xx_REG_DOT11_MAX_XMIT_MSDU_LIFETIME (0x1008)
256 #define ACX1xx_REG_DOT11_MAX_XMIT_MSDU_LIFETIME_LEN (0x04)
257 #define ACX1xx_REG_DOT11_GROUP_ADDR (0x1009)
258 #define ACX1xx_REG_DOT11_GROUP_ADDR_LEN (-1)
259 #define ACX1xx_REG_DOT11_CURRENT_REG_DOMAIN (0x100a)
260 #define ACX1xx_REG_DOT11_CURRENT_REG_DOMAIN_LEN (0x02)
261 /* It's harmless to have larger struct. Use USB case always. */
262 /* in fact len=1 for PCI */
263 #define ACX1xx_REG_DOT11_CURRENT_ANTENNA (0x100b)
264 #define ACX1xx_REG_DOT11_CURRENT_ANTENNA_LEN (0x02)
265 /* mapped to cfgInvalid in FW150 */
266 #define ACX1xx_REG_DOT11_UNKNOWN_100C (0x100c)
267 #define ACX1xx_REG_DOT11_UNKNOWN_100C_LEN (-1)
268 /* TNETW1450 has length 2!! */
269 #define ACX1xx_REG_DOT11_TX_POWER_LEVEL (0x100d)
270 #define ACX1xx_REG_DOT11_TX_POWER_LEVEL_LEN (0x01)
271 /* in fact len=1 for PCI */
272 #define ACX1xx_REG_DOT11_CURRENT_CCA_MODE (0x100e)
273 #define ACX1xx_REG_DOT11_CURRENT_CCA_MODE_LEN (0x02)
274 /* USB doesn't return anything - len==0?! */
275 #define ACX100_REG_DOT11_ED_THRESHOLD (0x100f)
276 #define ACX100_REG_DOT11_ED_THRESHOLD_LEN (0x04)
277 /* set default key ID; TNETW1450: length 2 */
278 #define ACX1xx_REG_DOT11_WEP_DEFAULT_KEY_SET (0x1010)
279 #define ACX1xx_REG_DOT11_WEP_DEFAULT_KEY_SET_LEN (0x01)
280 /* mapped to cfgInvalid in FW150 */
281 #define ACX100_REG_DOT11_UNKNOWN_1011 (0x1011)
282 #define ACX100_REG_DOT11_UNKNOWN_1011_LEN (-1)
283 /* later firmware versions; maybe TNETW1450 only? */
284 #define ACX1FF_REG_DOT11_CURR_5GHZ_REGDOM (0x1011)
285 #define ACX1FF_REG_DOT11_CURR_5GHZ_REGDOM_LEN (-1)
286 /* mapped to cfgInvalid in FW150 */
287 #define ACX100_REG_DOT11_UNKNOWN_1012 (0x1012)
288 #define ACX100_REG_DOT11_UNKNOWN_1012_LEN (-1)
289 /* mapped to cfgInvalid in FW150 */
290 #define ACX100_REG_DOT11_UNKNOWN_1013 (0x1013)
291 #define ACX100_REG_DOT11_UNKNOWN_1013_LEN (-1)
294 #endif /* _ACX_MMIO_H_ */