Commit | Line | Data |
---|---|---|
876c9d3a MT |
1 | /** |
2 | * This file contains definitions of WLAN commands. | |
3 | */ | |
4 | ||
5 | #ifndef _HOST_H_ | |
6 | #define _HOST_H_ | |
7 | ||
8 | /** PUBLIC DEFINITIONS */ | |
9 | #define DEFAULT_AD_HOC_CHANNEL 6 | |
10 | #define DEFAULT_AD_HOC_CHANNEL_A 36 | |
11 | ||
12 | /** IEEE 802.11 oids */ | |
13 | #define OID_802_11_SSID 0x00008002 | |
14 | #define OID_802_11_INFRASTRUCTURE_MODE 0x00008008 | |
15 | #define OID_802_11_FRAGMENTATION_THRESHOLD 0x00008009 | |
16 | #define OID_802_11_RTS_THRESHOLD 0x0000800A | |
17 | #define OID_802_11_TX_ANTENNA_SELECTED 0x0000800D | |
18 | #define OID_802_11_SUPPORTED_RATES 0x0000800E | |
19 | #define OID_802_11_STATISTICS 0x00008012 | |
20 | #define OID_802_11_TX_RETRYCOUNT 0x0000801D | |
21 | #define OID_802_11D_ENABLE 0x00008020 | |
22 | ||
23 | #define cmd_option_waitforrsp 0x0002 | |
24 | ||
25 | /** Host command ID */ | |
26 | #define cmd_code_dnld 0x0002 | |
27 | #define cmd_get_hw_spec 0x0003 | |
28 | #define cmd_eeprom_update 0x0004 | |
29 | #define cmd_802_11_reset 0x0005 | |
30 | #define cmd_802_11_scan 0x0006 | |
31 | #define cmd_802_11_get_log 0x000b | |
32 | #define cmd_mac_multicast_adr 0x0010 | |
33 | #define cmd_802_11_authenticate 0x0011 | |
34 | #define cmd_802_11_eeprom_access 0x0059 | |
35 | #define cmd_802_11_associate 0x0050 | |
36 | #define cmd_802_11_set_wep 0x0013 | |
37 | #define cmd_802_11_get_stat 0x0014 | |
38 | #define cmd_802_3_get_stat 0x0015 | |
39 | #define cmd_802_11_snmp_mib 0x0016 | |
40 | #define cmd_mac_reg_map 0x0017 | |
41 | #define cmd_bbp_reg_map 0x0018 | |
42 | #define cmd_mac_reg_access 0x0019 | |
43 | #define cmd_bbp_reg_access 0x001a | |
44 | #define cmd_rf_reg_access 0x001b | |
45 | #define cmd_802_11_radio_control 0x001c | |
46 | #define cmd_802_11_rf_channel 0x001d | |
47 | #define cmd_802_11_rf_tx_power 0x001e | |
48 | #define cmd_802_11_rssi 0x001f | |
49 | #define cmd_802_11_rf_antenna 0x0020 | |
50 | ||
51 | #define cmd_802_11_ps_mode 0x0021 | |
52 | ||
53 | #define cmd_802_11_data_rate 0x0022 | |
54 | #define cmd_rf_reg_map 0x0023 | |
55 | #define cmd_802_11_deauthenticate 0x0024 | |
56 | #define cmd_802_11_reassociate 0x0025 | |
57 | #define cmd_802_11_disassociate 0x0026 | |
58 | #define cmd_mac_control 0x0028 | |
59 | #define cmd_802_11_ad_hoc_start 0x002b | |
60 | #define cmd_802_11_ad_hoc_join 0x002c | |
61 | ||
62 | #define cmd_802_11_query_tkip_reply_cntrs 0x002e | |
63 | #define cmd_802_11_enable_rsn 0x002f | |
64 | #define cmd_802_11_pairwise_tsc 0x0036 | |
65 | #define cmd_802_11_group_tsc 0x0037 | |
66 | #define cmd_802_11_key_material 0x005e | |
67 | ||
68 | #define cmd_802_11_set_afc 0x003c | |
69 | #define cmd_802_11_get_afc 0x003d | |
70 | ||
71 | #define cmd_802_11_ad_hoc_stop 0x0040 | |
72 | ||
73 | #define cmd_802_11_beacon_stop 0x0049 | |
74 | ||
75 | #define cmd_802_11_mac_address 0x004D | |
76 | #define cmd_802_11_eeprom_access 0x0059 | |
77 | ||
78 | #define cmd_802_11_band_config 0x0058 | |
79 | ||
80 | #define cmd_802_11d_domain_info 0x005b | |
81 | ||
82 | #define cmd_802_11_sleep_params 0x0066 | |
83 | ||
84 | #define cmd_802_11_inactivity_timeout 0x0067 | |
85 | ||
86 | #define cmd_802_11_tpc_cfg 0x0072 | |
87 | #define cmd_802_11_pwr_cfg 0x0073 | |
88 | ||
89 | #define cmd_802_11_led_gpio_ctrl 0x004e | |
90 | ||
91 | #define cmd_802_11_subscribe_event 0x0075 | |
92 | ||
93 | #define cmd_802_11_rate_adapt_rateset 0x0076 | |
94 | ||
95 | #define cmd_802_11_tx_rate_query 0x007f | |
96 | ||
97 | #define cmd_get_tsf 0x0080 | |
98 | ||
99 | #define cmd_bt_access 0x0087 | |
100 | #define cmd_ret_bt_access 0x8087 | |
101 | ||
7db283c9 LCCR |
102 | #define cmd_fwt_access 0x0095 |
103 | #define cmd_ret_fwt_access 0x8095 | |
876c9d3a | 104 | |
7db283c9 LCCR |
105 | #define cmd_mesh_access 0x009b |
106 | #define cmd_ret_mesh_access 0x809b | |
876c9d3a MT |
107 | |
108 | /* For the IEEE Power Save */ | |
109 | #define cmd_subcmd_enter_ps 0x0030 | |
110 | #define cmd_subcmd_exit_ps 0x0031 | |
111 | #define cmd_subcmd_sleep_confirmed 0x0034 | |
112 | #define cmd_subcmd_full_powerdown 0x0035 | |
113 | #define cmd_subcmd_full_powerup 0x0036 | |
114 | ||
115 | /* command RET code, MSB is set to 1 */ | |
116 | #define cmd_ret_hw_spec_info 0x8003 | |
117 | #define cmd_ret_eeprom_update 0x8004 | |
118 | #define cmd_ret_802_11_reset 0x8005 | |
119 | #define cmd_ret_802_11_scan 0x8006 | |
120 | #define cmd_ret_802_11_get_log 0x800b | |
121 | #define cmd_ret_mac_control 0x8028 | |
122 | #define cmd_ret_mac_multicast_adr 0x8010 | |
123 | #define cmd_ret_802_11_authenticate 0x8011 | |
124 | #define cmd_ret_802_11_deauthenticate 0x8024 | |
125 | #define cmd_ret_802_11_associate 0x8012 | |
126 | #define cmd_ret_802_11_reassociate 0x8025 | |
127 | #define cmd_ret_802_11_disassociate 0x8026 | |
128 | #define cmd_ret_802_11_set_wep 0x8013 | |
129 | #define cmd_ret_802_11_stat 0x8014 | |
130 | #define cmd_ret_802_3_stat 0x8015 | |
131 | #define cmd_ret_802_11_snmp_mib 0x8016 | |
132 | #define cmd_ret_mac_reg_map 0x8017 | |
133 | #define cmd_ret_bbp_reg_map 0x8018 | |
134 | #define cmd_ret_rf_reg_map 0x8023 | |
135 | #define cmd_ret_mac_reg_access 0x8019 | |
136 | #define cmd_ret_bbp_reg_access 0x801a | |
137 | #define cmd_ret_rf_reg_access 0x801b | |
138 | #define cmd_ret_802_11_radio_control 0x801c | |
139 | #define cmd_ret_802_11_rf_channel 0x801d | |
140 | #define cmd_ret_802_11_rssi 0x801f | |
141 | #define cmd_ret_802_11_rf_tx_power 0x801e | |
142 | #define cmd_ret_802_11_rf_antenna 0x8020 | |
143 | #define cmd_ret_802_11_ps_mode 0x8021 | |
144 | #define cmd_ret_802_11_data_rate 0x8022 | |
145 | ||
146 | #define cmd_ret_802_11_ad_hoc_start 0x802B | |
147 | #define cmd_ret_802_11_ad_hoc_join 0x802C | |
148 | ||
149 | #define cmd_ret_802_11_query_tkip_reply_cntrs 0x802e | |
150 | #define cmd_ret_802_11_enable_rsn 0x802f | |
151 | #define cmd_ret_802_11_pairwise_tsc 0x8036 | |
152 | #define cmd_ret_802_11_group_tsc 0x8037 | |
153 | #define cmd_ret_802_11_key_material 0x805e | |
154 | ||
155 | #define cmd_enable_rsn 0x0001 | |
156 | #define cmd_disable_rsn 0x0000 | |
157 | ||
158 | #define cmd_act_set 0x0001 | |
159 | #define cmd_act_get 0x0000 | |
160 | ||
161 | #define cmd_act_get_AES (cmd_act_get + 2) | |
162 | #define cmd_act_set_AES (cmd_act_set + 2) | |
163 | #define cmd_act_remove_aes (cmd_act_set + 3) | |
164 | ||
165 | #define cmd_ret_802_11_set_afc 0x803c | |
166 | #define cmd_ret_802_11_get_afc 0x803d | |
167 | ||
168 | #define cmd_ret_802_11_ad_hoc_stop 0x8040 | |
169 | ||
170 | #define cmd_ret_802_11_beacon_stop 0x8049 | |
171 | ||
172 | #define cmd_ret_802_11_mac_address 0x804D | |
173 | #define cmd_ret_802_11_eeprom_access 0x8059 | |
174 | ||
175 | #define cmd_ret_802_11_band_config 0x8058 | |
176 | ||
177 | #define cmd_ret_802_11_sleep_params 0x8066 | |
178 | ||
179 | #define cmd_ret_802_11_inactivity_timeout 0x8067 | |
180 | ||
181 | #define cmd_ret_802_11d_domain_info (0x8000 | \ | |
182 | cmd_802_11d_domain_info) | |
183 | ||
184 | #define cmd_ret_802_11_tpc_cfg (cmd_802_11_tpc_cfg | 0x8000) | |
185 | #define cmd_ret_802_11_pwr_cfg (cmd_802_11_pwr_cfg | 0x8000) | |
186 | ||
187 | #define cmd_ret_802_11_led_gpio_ctrl 0x804e | |
188 | ||
189 | #define cmd_ret_802_11_subscribe_event (cmd_802_11_subscribe_event | 0x8000) | |
190 | ||
191 | #define cmd_ret_802_11_rate_adapt_rateset (cmd_802_11_rate_adapt_rateset | 0x8000) | |
192 | ||
193 | #define cmd_rte_802_11_tx_rate_query (cmd_802_11_tx_rate_query | 0x8000) | |
194 | ||
195 | #define cmd_ret_get_tsf 0x8080 | |
196 | ||
197 | /* Define action or option for cmd_802_11_set_wep */ | |
198 | #define cmd_act_add 0x0002 | |
199 | #define cmd_act_remove 0x0004 | |
200 | #define cmd_act_use_default 0x0008 | |
201 | ||
202 | #define cmd_type_wep_40_bit 0x0001 | |
203 | #define cmd_type_wep_104_bit 0x0002 | |
204 | ||
205 | #define cmd_NUM_OF_WEP_KEYS 4 | |
206 | ||
207 | #define cmd_WEP_KEY_INDEX_MASK 0x3fff | |
208 | ||
209 | /* Define action or option for cmd_802_11_reset */ | |
210 | #define cmd_act_halt 0x0003 | |
211 | ||
212 | /* Define action or option for cmd_802_11_scan */ | |
213 | #define cmd_bss_type_bss 0x0001 | |
214 | #define cmd_bss_type_ibss 0x0002 | |
215 | #define cmd_bss_type_any 0x0003 | |
216 | ||
217 | /* Define action or option for cmd_802_11_scan */ | |
218 | #define cmd_scan_type_active 0x0000 | |
219 | #define cmd_scan_type_passive 0x0001 | |
220 | ||
221 | #define cmd_scan_radio_type_bg 0 | |
222 | ||
223 | #define cmd_scan_probe_delay_time 0 | |
224 | ||
225 | /* Define action or option for cmd_mac_control */ | |
226 | #define cmd_act_mac_rx_on 0x0001 | |
227 | #define cmd_act_mac_tx_on 0x0002 | |
228 | #define cmd_act_mac_loopback_on 0x0004 | |
229 | #define cmd_act_mac_wep_enable 0x0008 | |
230 | #define cmd_act_mac_int_enable 0x0010 | |
231 | #define cmd_act_mac_multicast_enable 0x0020 | |
232 | #define cmd_act_mac_broadcast_enable 0x0040 | |
233 | #define cmd_act_mac_promiscuous_enable 0x0080 | |
234 | #define cmd_act_mac_all_multicast_enable 0x0100 | |
235 | #define cmd_act_mac_strict_protection_enable 0x0400 | |
236 | ||
237 | /* Define action or option for cmd_802_11_radio_control */ | |
238 | #define cmd_type_auto_preamble 0x0001 | |
239 | #define cmd_type_short_preamble 0x0002 | |
240 | #define cmd_type_long_preamble 0x0003 | |
241 | ||
242 | #define TURN_ON_RF 0x01 | |
243 | #define RADIO_ON 0x01 | |
244 | #define RADIO_OFF 0x00 | |
245 | ||
246 | #define SET_AUTO_PREAMBLE 0x05 | |
247 | #define SET_SHORT_PREAMBLE 0x03 | |
248 | #define SET_LONG_PREAMBLE 0x01 | |
249 | ||
250 | /* Define action or option for CMD_802_11_RF_CHANNEL */ | |
251 | #define cmd_opt_802_11_rf_channel_get 0x00 | |
252 | #define cmd_opt_802_11_rf_channel_set 0x01 | |
253 | ||
254 | /* Define action or option for cmd_802_11_rf_tx_power */ | |
255 | #define cmd_act_tx_power_opt_get 0x0000 | |
256 | #define cmd_act_tx_power_opt_set_high 0x8007 | |
257 | #define cmd_act_tx_power_opt_set_mid 0x8004 | |
258 | #define cmd_act_tx_power_opt_set_low 0x8000 | |
259 | ||
260 | #define cmd_act_tx_power_index_high 0x0007 | |
261 | #define cmd_act_tx_power_index_mid 0x0004 | |
262 | #define cmd_act_tx_power_index_low 0x0000 | |
263 | ||
264 | /* Define action or option for cmd_802_11_data_rate */ | |
265 | #define cmd_act_set_tx_auto 0x0000 | |
266 | #define cmd_act_set_tx_fix_rate 0x0001 | |
267 | #define cmd_act_get_tx_rate 0x0002 | |
268 | ||
269 | #define cmd_act_set_rx 0x0001 | |
270 | #define cmd_act_set_tx 0x0002 | |
271 | #define cmd_act_set_both 0x0003 | |
272 | #define cmd_act_get_rx 0x0004 | |
273 | #define cmd_act_get_tx 0x0008 | |
274 | #define cmd_act_get_both 0x000c | |
275 | ||
276 | /* Define action or option for cmd_802_11_ps_mode */ | |
277 | #define cmd_type_cam 0x0000 | |
278 | #define cmd_type_max_psp 0x0001 | |
279 | #define cmd_type_fast_psp 0x0002 | |
280 | ||
281 | /* Define action or option for cmd_bt_access */ | |
282 | enum cmd_bt_access_opts { | |
283 | /* The bt commands start at 5 instead of 1 because the old dft commands | |
284 | * are mapped to 1-4. These old commands are no longer maintained and | |
285 | * should not be called. | |
286 | */ | |
287 | cmd_act_bt_access_add = 5, | |
288 | cmd_act_bt_access_del, | |
289 | cmd_act_bt_access_list, | |
90e8eafc LCC |
290 | cmd_act_bt_access_reset, |
291 | cmd_act_bt_access_set_invert, | |
292 | cmd_act_bt_access_get_invert | |
876c9d3a MT |
293 | }; |
294 | ||
295 | /* Define action or option for cmd_fwt_access */ | |
296 | enum cmd_fwt_access_opts { | |
297 | cmd_act_fwt_access_add = 1, | |
298 | cmd_act_fwt_access_del, | |
299 | cmd_act_fwt_access_lookup, | |
300 | cmd_act_fwt_access_list, | |
301 | cmd_act_fwt_access_list_route, | |
302 | cmd_act_fwt_access_list_neighbor, | |
303 | cmd_act_fwt_access_reset, | |
304 | cmd_act_fwt_access_cleanup, | |
305 | cmd_act_fwt_access_time, | |
306 | }; | |
307 | ||
308 | /* Define action or option for cmd_mesh_access */ | |
309 | enum cmd_mesh_access_opts { | |
310 | cmd_act_mesh_get_ttl = 1, | |
311 | cmd_act_mesh_set_ttl, | |
312 | cmd_act_mesh_get_stats, | |
82fde74b LC |
313 | cmd_act_mesh_get_anycast, |
314 | cmd_act_mesh_set_anycast, | |
876c9d3a MT |
315 | }; |
316 | ||
317 | /** Card Event definition */ | |
318 | #define MACREG_INT_CODE_TX_PPA_FREE 0x00000000 | |
319 | #define MACREG_INT_CODE_TX_DMA_DONE 0x00000001 | |
320 | #define MACREG_INT_CODE_LINK_LOSE_W_SCAN 0x00000002 | |
321 | #define MACREG_INT_CODE_LINK_LOSE_NO_SCAN 0x00000003 | |
322 | #define MACREG_INT_CODE_LINK_SENSED 0x00000004 | |
323 | #define MACREG_INT_CODE_CMD_FINISHED 0x00000005 | |
324 | #define MACREG_INT_CODE_MIB_CHANGED 0x00000006 | |
325 | #define MACREG_INT_CODE_INIT_DONE 0x00000007 | |
326 | #define MACREG_INT_CODE_DEAUTHENTICATED 0x00000008 | |
327 | #define MACREG_INT_CODE_DISASSOCIATED 0x00000009 | |
328 | #define MACREG_INT_CODE_PS_AWAKE 0x0000000a | |
329 | #define MACREG_INT_CODE_PS_SLEEP 0x0000000b | |
330 | #define MACREG_INT_CODE_MIC_ERR_MULTICAST 0x0000000d | |
331 | #define MACREG_INT_CODE_MIC_ERR_UNICAST 0x0000000e | |
332 | #define MACREG_INT_CODE_WM_AWAKE 0x0000000f | |
333 | #define MACREG_INT_CODE_ADHOC_BCN_LOST 0x00000011 | |
334 | #define MACREG_INT_CODE_RSSI_LOW 0x00000019 | |
335 | #define MACREG_INT_CODE_SNR_LOW 0x0000001a | |
336 | #define MACREG_INT_CODE_MAX_FAIL 0x0000001b | |
337 | #define MACREG_INT_CODE_RSSI_HIGH 0x0000001c | |
338 | #define MACREG_INT_CODE_SNR_HIGH 0x0000001d | |
7d8d28b3 | 339 | #define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023 |
876c9d3a MT |
340 | |
341 | #endif /* _HOST_H_ */ |