]>
Commit | Line | Data |
---|---|---|
c5c77ba1 JK |
1 | /* ////////////////////////////////////////////////////////////////////////// */ |
2 | /* */ | |
3 | /* Copyright (c) Atmel Corporation. All rights reserved. */ | |
4 | /* */ | |
5 | /* Module Name: wilc_wlan_if.h */ | |
6 | /* */ | |
7 | /* */ | |
8 | /* ///////////////////////////////////////////////////////////////////////// */ | |
9 | ||
10 | ||
11 | #ifndef WILC_WLAN_IF_H | |
12 | #define WILC_WLAN_IF_H | |
13 | ||
14 | /*bug 3887: [AP] Allow Management frames to be passed to the host*/ | |
15 | #define WILC_AP_EXTERNAL_MLME | |
16 | #define WILC_P2P | |
17 | #define TCP_ENHANCEMENTS | |
18 | /* #define MEMORY_STATIC */ | |
19 | /* #define WILC_FULLY_HOSTING_AP */ | |
20 | /* #define USE_OLD_SPI_SW */ | |
21 | ||
22 | ||
36a24b4e | 23 | #include "wilc_oswrapper.h" |
c5c77ba1 JK |
24 | #include "linux_wlan_common.h" |
25 | ||
26 | ||
27 | /******************************************** | |
28 | * | |
29 | * Debug Flags | |
30 | * | |
31 | ********************************************/ | |
32 | ||
33 | #define N_INIT 0x00000001 | |
34 | #define N_ERR 0x00000002 | |
35 | #define N_TXQ 0x00000004 | |
36 | #define N_INTR 0x00000008 | |
37 | #define N_RXQ 0x00000010 | |
38 | ||
39 | /******************************************** | |
40 | * | |
41 | * Host Interface Defines | |
42 | * | |
43 | ********************************************/ | |
44 | ||
45 | #define HIF_SDIO (0) | |
2d33ff12 HPGE |
46 | #define HIF_SPI BIT(0) |
47 | #define HIF_SDIO_GPIO_IRQ BIT(2) | |
c5c77ba1 JK |
48 | |
49 | ||
50 | /******************************************** | |
51 | * | |
52 | * Tx/Rx Buffer Size Defines | |
53 | * | |
54 | ********************************************/ | |
55 | ||
56 | #define CE_TX_BUFFER_SIZE (64 * 1024) | |
57 | #define CE_RX_BUFFER_SIZE (384 * 1024) | |
58 | ||
59 | /******************************************** | |
60 | * | |
61 | * Wlan Interface Defines | |
62 | * | |
63 | ********************************************/ | |
64 | ||
65 | typedef struct { | |
66 | uint32_t read_write: 1; | |
67 | uint32_t function: 3; | |
68 | uint32_t raw: 1; | |
69 | uint32_t address: 17; | |
70 | uint32_t data: 8; | |
71 | } sdio_cmd52_t; | |
72 | ||
73 | typedef struct { | |
74 | /* struct { */ | |
75 | uint32_t read_write: 1; | |
76 | uint32_t function: 3; | |
77 | uint32_t block_mode: 1; | |
78 | uint32_t increment: 1; | |
79 | uint32_t address: 17; | |
80 | uint32_t count: 9; | |
81 | /* } bit; */ | |
82 | uint8_t *buffer; | |
83 | uint32_t block_size; | |
84 | } sdio_cmd53_t; | |
85 | ||
86 | typedef struct { | |
c5c77ba1 | 87 | void (*os_debug)(uint8_t *); |
4e4467fd | 88 | int (*os_wait)(void *, u32); |
c5c77ba1 JK |
89 | } wilc_wlan_os_func_t; |
90 | ||
91 | typedef struct { | |
92 | int io_type; | |
93 | int (*io_init)(void *); | |
94 | void (*io_deinit)(void *); | |
95 | union { | |
96 | struct { | |
97 | int (*sdio_cmd52)(sdio_cmd52_t *); | |
98 | int (*sdio_cmd53)(sdio_cmd53_t *); | |
99 | int (*sdio_set_max_speed)(void); | |
100 | int (*sdio_set_default_speed)(void); | |
101 | } sdio; | |
102 | struct { | |
103 | int (*spi_max_speed)(void); | |
104 | int (*spi_tx)(uint8_t *, uint32_t); | |
105 | int (*spi_rx)(uint8_t *, uint32_t); | |
106 | int (*spi_trx)(uint8_t *, uint8_t *, uint32_t); | |
107 | } spi; | |
108 | } u; | |
109 | } wilc_wlan_io_func_t; | |
110 | ||
111 | typedef struct { | |
112 | void (*rx_indicate)(uint8_t *, uint32_t, uint32_t); | |
113 | void (*rx_complete)(void); | |
114 | } wilc_wlan_net_func_t; | |
115 | ||
116 | typedef struct { | |
117 | void (*mac_indicate)(int); | |
118 | } wilc_wlan_indicate_func_t; | |
119 | #define WILC_MAC_INDICATE_STATUS 0x1 | |
120 | #define WILC_MAC_STATUS_INIT -1 | |
121 | #define WILC_MAC_STATUS_READY 0 | |
122 | #define WILC_MAC_STATUS_CONNECT 1 | |
123 | ||
124 | #define WILC_MAC_INDICATE_SCAN 0x2 | |
125 | ||
126 | typedef struct { | |
127 | void *os_private; | |
128 | ||
5e150b52 | 129 | struct mutex *hif_critical_section; |
c5c77ba1 JK |
130 | |
131 | uint32_t tx_buffer_size; | |
132 | void *txq_critical_section; | |
133 | ||
134 | /*Added by Amr - BugID_4720*/ | |
135 | void *txq_add_to_head_critical_section; | |
136 | void *txq_spin_lock; | |
137 | ||
138 | void *txq_wait_event; | |
139 | ||
140 | #if defined(MEMORY_STATIC) | |
141 | uint32_t rx_buffer_size; | |
142 | #endif | |
143 | void *rxq_critical_section; | |
144 | void *rxq_wait_event; | |
145 | ||
8990d856 | 146 | struct semaphore *cfg_wait_event; |
c5c77ba1 JK |
147 | } wilc_wlan_os_context_t; |
148 | ||
149 | typedef struct { | |
150 | wilc_wlan_os_context_t os_context; | |
151 | wilc_wlan_os_func_t os_func; | |
152 | wilc_wlan_io_func_t io_func; | |
153 | wilc_wlan_net_func_t net_func; | |
154 | wilc_wlan_indicate_func_t indicate_func; | |
155 | } wilc_wlan_inp_t; | |
156 | ||
c5c77ba1 JK |
157 | struct tx_complete_data { |
158 | #ifdef WILC_FULLY_HOSTING_AP | |
159 | struct tx_complete_data *next; | |
160 | #endif | |
161 | int size; | |
162 | void *buff; | |
163 | uint8_t *pBssid; | |
164 | struct sk_buff *skb; | |
165 | }; | |
166 | ||
167 | ||
168 | typedef void (*wilc_tx_complete_func_t)(void *, int); | |
169 | ||
170 | #define WILC_TX_ERR_NO_BUF (-2) | |
171 | ||
172 | typedef struct { | |
173 | int (*wlan_firmware_download)(const uint8_t *, uint32_t); | |
174 | int (*wlan_start)(void); | |
175 | int (*wlan_stop)(void); | |
176 | int (*wlan_add_to_tx_que)(void *, uint8_t *, uint32_t, wilc_tx_complete_func_t); | |
177 | int (*wlan_handle_tx_que)(uint32_t *); | |
178 | void (*wlan_handle_rx_que)(void); | |
179 | void (*wlan_handle_rx_isr)(void); | |
180 | void (*wlan_cleanup)(void); | |
181 | int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, uint32_t); | |
182 | int (*wlan_cfg_get)(int, uint32_t, int, uint32_t); | |
183 | int (*wlan_cfg_get_value)(uint32_t, uint8_t *, uint32_t); | |
184 | /*Bug3959: transmitting mgmt frames received from host*/ | |
185 | #if defined(WILC_AP_EXTERNAL_MLME) || defined(WILC_P2P) | |
186 | int (*wlan_add_mgmt_to_tx_que)(void *, uint8_t *, uint32_t, wilc_tx_complete_func_t); | |
187 | ||
188 | #ifdef WILC_FULLY_HOSTING_AP | |
189 | int (*wlan_add_data_to_tx_que)(void *, uint8_t *, uint32_t, wilc_tx_complete_func_t); | |
190 | #endif | |
191 | ||
192 | #endif | |
193 | } wilc_wlan_oup_t; | |
194 | ||
195 | /******************************************** | |
196 | * | |
197 | * Wlan Configuration ID | |
198 | * | |
199 | ********************************************/ | |
200 | ||
201 | #define MAX_SSID_LEN 33 | |
202 | #define MAX_RATES_SUPPORTED 12 | |
203 | ||
4e4467fd | 204 | #define INFINITE_SLEEP_TIME ((u32)0xFFFFFFFF) |
c5c77ba1 JK |
205 | |
206 | #ifdef WILC_PARSE_SCAN_IN_HOST | |
207 | typedef enum { | |
208 | SUPP_RATES_IE = 1, | |
209 | EXT_SUPP_RATES_IE = 50, | |
210 | HT_CAPABILITY_IE = 45, | |
211 | RSN_IE = 48, | |
212 | WPA_IE = 221, | |
213 | WMM_IE = 221, | |
214 | #ifdef WILC_P2P | |
215 | P2P_IE = 221, | |
216 | #endif | |
217 | } BEACON_IE; | |
218 | #endif | |
219 | typedef enum { | |
220 | INFRASTRUCTURE = 0, | |
221 | INDEPENDENT, | |
222 | AP, | |
223 | } BSSTYPE_T; | |
224 | ||
225 | typedef enum { | |
226 | RATE_AUTO = 0, | |
227 | RATE_1MB = 1, | |
228 | RATE_2MB = 2, | |
229 | RATE_5MB = 5, | |
230 | RATE_6MB = 6, | |
231 | RATE_9MB = 9, | |
232 | RATE_11MB = 11, | |
233 | RATE_12MB = 12, | |
234 | RATE_18MB = 18, | |
235 | RATE_24MB = 24, | |
236 | RATE_26MB = 36, | |
237 | RATE_48MB = 48, | |
238 | RATE_54MB = 54 | |
239 | } TX_RATE_T; | |
240 | ||
241 | typedef enum { | |
242 | B_ONLY_MODE = 0, /* basic rate: 1, 2 Mbps, otherwise: 5, 11 Mbps */ | |
243 | G_ONLY_MODE, /* basic rate: 6, 12, 24 Mbps, otherwise: 9, 18, 36, 48, 54 Mbps */ | |
244 | G_MIXED_11B_1_MODE, /* basic rate: 1, 2, 5.5, 11 Mbps, otherwise: all on */ | |
245 | G_MIXED_11B_2_MODE, /* basic rate: 1, 2, 5, 11, 6, 12, 24 Mbps, otherwise: all on */ | |
246 | } G_OPERATING_MODE_T; | |
247 | ||
248 | typedef enum { | |
249 | G_SHORT_PREAMBLE = 0, /* Short Preamble */ | |
250 | G_LONG_PREAMBLE = 1, /* Long Preamble */ | |
251 | G_AUTO_PREAMBLE = 2, /* Auto Preamble Selection */ | |
252 | } G_PREAMBLE_T; | |
253 | ||
254 | #define MAC_CONNECTED 1 | |
255 | #define MAC_DISCONNECTED 0 | |
256 | ||
257 | /*bug3819: */ | |
258 | #define SCAN_DONE TRUE | |
259 | typedef enum { | |
260 | PASSIVE_SCAN = 0, | |
261 | ACTIVE_SCAN = 1, | |
262 | } SCANTYPE_T; | |
263 | ||
264 | typedef enum { | |
265 | NO_POWERSAVE = 0, | |
266 | MIN_FAST_PS = 1, | |
267 | MAX_FAST_PS = 2, | |
268 | MIN_PSPOLL_PS = 3, | |
269 | MAX_PSPOLL_PS = 4 | |
270 | } USER_PS_MODE_T; | |
271 | ||
272 | typedef enum { | |
273 | CHIP_WAKEDUP = 0, | |
274 | CHIP_SLEEPING_AUTO = 1, | |
275 | CHIP_SLEEPING_MANUAL = 2 | |
276 | } CHIP_PS_STATE_T; | |
277 | ||
278 | typedef enum { | |
279 | ACQUIRE_ONLY = 0, | |
280 | ACQUIRE_AND_WAKEUP = 1, | |
281 | } BUS_ACQUIRE_T; | |
282 | ||
283 | typedef enum { | |
284 | RELEASE_ONLY = 0, | |
285 | RELEASE_ALLOW_SLEEP = 1, | |
286 | } BUS_RELEASE_T; | |
287 | ||
288 | typedef enum { | |
289 | NO_SECURITY = 0, | |
290 | WEP_40 = 0x3, | |
291 | WEP_104 = 0x7, | |
292 | WPA_AES = 0x29, | |
293 | WPA_TKIP = 0x49, | |
294 | WPA_AES_TKIP = 0x69, /* Aes or Tkip */ | |
295 | WPA2_AES = 0x31, | |
296 | WPA2_TKIP = 0x51, | |
297 | WPA2_AES_TKIP = 0x71, /* Aes or Tkip */ | |
298 | } SECURITY_T; | |
299 | ||
300 | typedef enum { | |
301 | OPEN_SYSTEM = 1, | |
302 | SHARED_KEY = 2, | |
303 | ANY = 3, | |
304 | IEEE8021 = 5 | |
305 | } AUTHTYPE_T; | |
306 | ||
307 | typedef enum { | |
308 | SITE_SURVEY_1CH = 0, | |
309 | SITE_SURVEY_ALL_CH = 1, | |
310 | SITE_SURVEY_OFF = 2 | |
311 | } SITE_SURVEY_T; | |
312 | ||
313 | typedef enum { | |
314 | NORMAL_ACK = 0, | |
315 | NO_ACK, | |
316 | } ACK_POLICY_T; | |
317 | ||
318 | typedef enum { | |
319 | DONT_RESET = 0, | |
320 | DO_RESET = 1, | |
321 | NO_REQUEST = 2, | |
322 | } RESET_REQ_T; | |
323 | ||
324 | typedef enum { | |
325 | REKEY_DISABLE = 1, | |
326 | REKEY_TIME_BASE, | |
327 | REKEY_PKT_BASE, | |
328 | REKEY_TIME_PKT_BASE | |
329 | } RSNA_REKEY_POLICY_T; | |
330 | ||
331 | typedef enum { | |
332 | FILTER_NO = 0x00, | |
333 | FILTER_AP_ONLY = 0x01, | |
334 | FILTER_STA_ONLY = 0x02 | |
335 | } SCAN_CLASS_FITLER_T; | |
336 | ||
337 | typedef enum { | |
338 | PRI_HIGH_RSSI = 0x00, | |
339 | PRI_LOW_RSSI = 0x04, | |
340 | PRI_DETECT = 0x08 | |
341 | } SCAN_PRI_T; | |
342 | ||
343 | typedef enum { | |
344 | CH_FILTER_OFF = 0x00, | |
345 | CH_FILTER_ON = 0x10 | |
346 | } CH_FILTER_T; | |
347 | ||
348 | typedef enum { | |
349 | AUTO_PROT = 0, /* Auto */ | |
350 | NO_PROT, /* Do not use any protection */ | |
351 | ERP_PROT, /* Protect all ERP frame exchanges */ | |
352 | HT_PROT, /* Protect all HT frame exchanges */ | |
353 | GF_PROT, /* Protect all GF frame exchanges */ | |
354 | } N_PROTECTION_MODE_T; | |
355 | ||
356 | typedef enum { | |
357 | G_SELF_CTS_PROT, | |
358 | G_RTS_CTS_PROT, | |
359 | } G_PROTECTION_MODE_T; | |
360 | ||
361 | typedef enum { | |
362 | HT_MIXED_MODE = 1, | |
363 | HT_ONLY_20MHZ_MODE, | |
364 | HT_ONLY_20_40MHZ_MODE, | |
365 | } N_OPERATING_MODE_T; | |
366 | ||
367 | typedef enum { | |
368 | NO_DETECT = 0, | |
369 | DETECT_ONLY = 1, | |
370 | DETECT_PROTECT = 2, | |
371 | DETECT_PROTECT_REPORT = 3, | |
372 | } N_OBSS_DETECTION_T; | |
373 | ||
374 | typedef enum { | |
375 | RTS_CTS_NONHT_PROT = 0, /* RTS-CTS at non-HT rate */ | |
376 | FIRST_FRAME_NONHT_PROT, /* First frame at non-HT rate */ | |
377 | LSIG_TXOP_PROT, /* LSIG TXOP Protection */ | |
378 | FIRST_FRAME_MIXED_PROT, /* First frame at Mixed format */ | |
379 | } N_PROTECTION_TYPE_T; | |
380 | ||
381 | typedef enum { | |
382 | STATIC_MODE = 1, | |
383 | DYNAMIC_MODE = 2, | |
384 | MIMO_MODE = 3, /* power save disable */ | |
385 | } N_SMPS_MODE_T; | |
386 | ||
387 | typedef enum { | |
388 | DISABLE_SELF_CTS, | |
389 | ENABLE_SELF_CTS, | |
390 | DISABLE_TX_ABORT, | |
391 | ENABLE_TX_ABORT, | |
392 | HW_TRIGGER_ABORT, | |
393 | SW_TRIGGER_ABORT, | |
394 | } TX_ABORT_OPTION_T; | |
395 | ||
396 | typedef enum { | |
397 | WID_CHAR = 0, | |
398 | WID_SHORT = 1, | |
399 | WID_INT = 2, | |
400 | WID_STR = 3, | |
401 | WID_BIN_DATA = 4, | |
402 | WID_BIN = 5, | |
403 | WID_IP = 6, | |
404 | WID_ADR = 7, | |
405 | WID_UNDEF = 8, | |
406 | WID_TYPE_FORCE_32BIT = 0xFFFFFFFF | |
407 | ||
408 | } WID_TYPE_T, tenuWIDtype; | |
409 | ||
410 | typedef enum { | |
411 | WID_NIL = 0xffff, | |
412 | ||
413 | ||
414 | /* BSS Type */ | |
415 | /* -------------------------------------------------------------- */ | |
416 | /* Configuration : Infrastructure Independent Access Point */ | |
417 | /* Values to set : 0 1 2 */ | |
418 | /* -------------------------------------------------------------- */ | |
419 | WID_BSS_TYPE = 0x0000, | |
420 | ||
421 | /* Transmit Rate */ | |
422 | /* -------------------------------------------------------------- */ | |
423 | /* Configuration : 1 2 5.5 11 6 9 12 18 24 36 48 54 */ | |
424 | /* Values to set : 1 2 5 11 6 9 12 18 24 36 48 54 */ | |
425 | /* -------------------------------------------------------------- */ | |
426 | WID_CURRENT_TX_RATE = 0x0001, | |
427 | ||
428 | /* Channel */ | |
429 | /* ------------------------------------------------------------------- */ | |
430 | /* Configuration(g) : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ | |
431 | /* Values to set : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ | |
432 | /* -------------------------------------------------------------------- */ | |
433 | WID_CURRENT_CHANNEL = 0x0002, | |
434 | ||
435 | /* Preamble */ | |
436 | /* -------------------------------------------------------------- */ | |
437 | /* Configuration : short long Auto */ | |
438 | /* Values to set : 0 1 2 */ | |
439 | /* -------------------------------------------------------------- */ | |
440 | WID_PREAMBLE = 0x0003, | |
441 | ||
442 | /* 11g operating mode (ignored if 11g not present) */ | |
443 | /* -------------------------------------------------------------- */ | |
444 | /* Configuration : HighPerf Compat(RSet #1) Compat(RSet #2) */ | |
445 | /* Values to set : 1 2 3 */ | |
446 | /* -------------------------------------------------------------- */ | |
447 | WID_11G_OPERATING_MODE = 0x0004, | |
448 | ||
449 | /* Mac status (response only) */ | |
450 | /* -------------------------------------------------------------- */ | |
451 | /* Configuration : disconnect connect */ | |
452 | /* Values to get : 0 1 */ | |
453 | /* -------------------------------------------------------------- */ | |
454 | WID_STATUS = 0x0005, | |
455 | ||
456 | /* Scan type */ | |
457 | /* -------------------------------------------------------------- */ | |
458 | /* Configuration : Passive Scanning Active Scanning */ | |
459 | /* Values to set : 0 1 */ | |
460 | /* -------------------------------------------------------------- */ | |
461 | WID_SCAN_TYPE = 0x0007, | |
462 | ||
463 | /* Key Id (WEP default key Id) */ | |
464 | /* -------------------------------------------------------------- */ | |
465 | /* Configuration : Any value between 0 to 3 */ | |
466 | /* Values to set : Same value. Default is 0 */ | |
467 | /* -------------------------------------------------------------- */ | |
468 | WID_KEY_ID = 0x0009, | |
469 | ||
470 | /* QoS Enable */ | |
471 | /* -------------------------------------------------------------- */ | |
472 | /* Configuration : QoS Disable WMM Enable */ | |
473 | /* Values to set : 0 1 */ | |
474 | /* -------------------------------------------------------------- */ | |
475 | WID_QOS_ENABLE = 0x000A, | |
476 | ||
477 | /* Power Management */ | |
478 | /* ------------------------------------------------------------------ */ | |
479 | /* Configuration : NO_POWERSAVE MIN_POWERSAVE MAX_POWERSAVE */ | |
480 | /* Values to set : 0 1 2 */ | |
481 | /* ------------------------------------------------------------------ */ | |
482 | WID_POWER_MANAGEMENT = 0x000B, | |
483 | ||
484 | /* WEP/802 11I Configuration */ | |
485 | /* ------------------------------------------------------------------ */ | |
486 | /* Configuration : Disable WP40 WP104 WPA-AES WPA-TKIP RSN-AES RSN-TKIP */ | |
487 | /* Values (0x) : 00 03 07 29 49 31 51 */ | |
488 | /* */ | |
489 | /* Configuration : WPA-AES+TKIP RSN-AES+TKIP */ | |
490 | /* Values (0x) : 69 71 */ | |
491 | /* ------------------------------------------------------------------ */ | |
492 | WID_11I_MODE = 0x000C, | |
493 | ||
494 | /* WEP Configuration: Used in BSS STA mode only when WEP is enabled */ | |
495 | /* ------------------------------------------------------------------ */ | |
496 | /* Configuration : Open System Shared Key Any Type | 802.1x Auth */ | |
497 | /* Values (0x) : 01 02 03 | BIT2 */ | |
498 | /* ------------------------------------------------------------------ */ | |
499 | WID_AUTH_TYPE = 0x000D, | |
500 | ||
501 | /* Site Survey Type */ | |
502 | /* -------------------------------------------------------------- */ | |
503 | /* Configuration : Values to set */ | |
504 | /* Survey 1 Channel : 0 */ | |
505 | /* survey all Channels : 1 */ | |
506 | /* Disable Site Survey : 2 */ | |
507 | /* -------------------------------------------------------------- */ | |
508 | WID_SITE_SURVEY = 0x000E, | |
509 | ||
510 | /* Listen Interval */ | |
511 | /* -------------------------------------------------------------- */ | |
512 | /* Configuration : Any value between 1 to 255 */ | |
513 | /* Values to set : Same value. Default is 3 */ | |
514 | /* -------------------------------------------------------------- */ | |
515 | WID_LISTEN_INTERVAL = 0x000F, | |
516 | ||
517 | /* DTIM Period */ | |
518 | /* -------------------------------------------------------------- */ | |
519 | /* Configuration : Any value between 1 to 255 */ | |
520 | /* Values to set : Same value. Default is 3 */ | |
521 | /* -------------------------------------------------------------- */ | |
522 | WID_DTIM_PERIOD = 0x0010, | |
523 | ||
524 | /* ACK Policy */ | |
525 | /* -------------------------------------------------------------- */ | |
526 | /* Configuration : Normal Ack No Ack */ | |
527 | /* Values to set : 0 1 */ | |
528 | /* -------------------------------------------------------------- */ | |
529 | WID_ACK_POLICY = 0x0011, | |
530 | ||
531 | /* Reset MAC (Set only) */ | |
532 | /* -------------------------------------------------------------- */ | |
533 | /* Configuration : Don't Reset Reset No Request */ | |
534 | /* Values to set : 0 1 2 */ | |
535 | /* -------------------------------------------------------------- */ | |
536 | WID_RESET = 0x0012, | |
537 | ||
538 | /* Broadcast SSID Option: Setting this will adhere to "" SSID element */ | |
539 | /* ------------------------------------------------------------------ */ | |
540 | /* Configuration : Enable Disable */ | |
541 | /* Values to set : 1 0 */ | |
542 | /* ------------------------------------------------------------------ */ | |
543 | WID_BCAST_SSID = 0x0015, | |
544 | ||
545 | /* Disconnect (Station) */ | |
546 | /* ------------------------------------------------------------------ */ | |
547 | /* Configuration : Association ID */ | |
548 | /* Values to set : Association ID */ | |
549 | /* ------------------------------------------------------------------ */ | |
550 | WID_DISCONNECT = 0x0016, | |
551 | ||
552 | /* 11a Tx Power Level */ | |
553 | /* -------------------------------------------------------------------- */ | |
554 | /* Configuration : Sets TX Power (Higher the value greater the power) */ | |
555 | /* Values to set : Any value between 0 and 63 (inclusive; Default is 48)*/ | |
556 | /* -------------------------------------------------------------------- */ | |
557 | WID_TX_POWER_LEVEL_11A = 0x0018, | |
558 | ||
559 | /* Group Key Update Policy Selection */ | |
560 | /* -------------------------------------------------------------------- */ | |
561 | /* Configuration : Disabled timeBased packetBased timePacketBased */ | |
562 | /* Values to set : 1 2 3 4 */ | |
563 | /* -------------------------------------------------------------------- */ | |
564 | WID_REKEY_POLICY = 0x0019, | |
565 | ||
566 | /* Allow Short Slot */ | |
567 | /* -------------------------------------------------------------- */ | |
568 | /* Configuration : Disallow Short Slot Allow Short Slot */ | |
569 | /* (Enable Only Long Slot) (Enable Short Slot if applicable)*/ | |
570 | /* Values to set : 0 1 */ | |
571 | /* -------------------------------------------------------------- */ | |
572 | WID_SHORT_SLOT_ALLOWED = 0x001A, | |
573 | ||
574 | WID_PHY_ACTIVE_REG = 0x001B, | |
575 | ||
576 | /* 11b Tx Power Level */ | |
577 | /* -------------------------------------------------------------------- */ | |
578 | /* Configuration : Sets TX Power (Higher the value greater the power) */ | |
579 | /* Values to set : Any value between 0 and 63 (inclusive; Default is 48)*/ | |
580 | /* -------------------------------------------------------------------- */ | |
581 | WID_TX_POWER_LEVEL_11B = 0x001D, | |
582 | ||
583 | /* Scan Request */ | |
584 | /* -------------------------------------------------------------------- */ | |
585 | /* Configuration : Request default scan */ | |
586 | /* Values to set : 0 */ | |
587 | /* -------------------------------------------------------------------- */ | |
588 | WID_START_SCAN_REQ = 0x001E, | |
589 | ||
590 | /* Rssi (get only) */ | |
591 | /* -------------------------------------------------------------------- */ | |
592 | /* Configuration : */ | |
593 | /* Values to get : Rssi value */ | |
594 | /* -------------------------------------------------------------------- */ | |
595 | WID_RSSI = 0x001F, | |
596 | ||
597 | /* Join Request */ | |
598 | /* -------------------------------------------------------------------- */ | |
599 | /* Configuration : Request to join */ | |
600 | /* Values to set : index of scan result */ | |
601 | /* -------------------------------------------------------------------- */ | |
602 | WID_JOIN_REQ = 0x0020, | |
603 | ||
604 | WID_LINKSPEED = 0x0026, | |
605 | ||
606 | /* Enable User Control of TX Power */ | |
607 | /* -------------------------------------------------------------------- */ | |
608 | /* Configuration : Disable Enable */ | |
609 | /* Values to set : 0 1 */ | |
610 | /* -------------------------------------------------------------------- */ | |
611 | WID_USER_CONTROL_ON_TX_POWER = 0x0027, | |
612 | ||
613 | WID_MEMORY_ACCESS_8BIT = 0x0029, | |
614 | ||
615 | /* Enable Auto RX Sensitivity feature */ | |
616 | /* -------------------------------------------------------------------- */ | |
617 | /* Configuration : Disable Enable */ | |
618 | /* Values to set : 0 1 */ | |
619 | /* -------------------------------------------------------------------- */ | |
620 | WID_AUTO_RX_SENSITIVITY = 0x0032, | |
621 | ||
622 | /* Receive Buffer Based Ack */ | |
623 | /* -------------------------------------------------------------------- */ | |
624 | /* Configuration : Disable Enable */ | |
625 | /* Values to set : 0 1 */ | |
626 | /* -------------------------------------------------------------------- */ | |
627 | WID_DATAFLOW_CONTROL = 0x0033, | |
628 | ||
629 | /* Scan Filter */ | |
630 | /* -------------------------------------------------------------------- */ | |
631 | /* Configuration : Class No filter AP only Station Only */ | |
632 | /* Values to set : 0 1 2 */ | |
633 | /* Configuration : Priority High Rssi Low Rssi Detect */ | |
634 | /* Values to set : 0 0x4 0x08 */ | |
635 | /* Configuration : Channel filter off filter on */ | |
636 | /* Values to set : 0 0x10 */ | |
637 | /* -------------------------------------------------------------------- */ | |
638 | WID_SCAN_FILTER = 0x0036, | |
639 | ||
640 | /* Link Loss Threshold (measure in the beacon period) */ | |
641 | /* -------------------------------------------------------------------- */ | |
642 | /* Configuration : Any value between 10 and 254 (Set to 255 to disable it) */ | |
643 | /* Values to set : Same value. Default is 10 */ | |
644 | /* -------------------------------------------------------------------- */ | |
645 | WID_LINK_LOSS_THRESHOLD = 0x0037, | |
646 | ||
647 | /*BugID_4978*/ | |
648 | WID_ABORT_RUNNING_SCAN = 0x003E, | |
649 | ||
650 | /* NMAC Character WID list */ | |
651 | WID_WPS_START = 0x0043, | |
652 | ||
653 | /* Protection mode for MAC */ | |
654 | /* -------------------------------------------------------------- */ | |
655 | /* Configuration : Auto No protection ERP HT GF */ | |
656 | /* Values to set : 0 1 2 3 4 */ | |
657 | /* -------------------------------------------------------------- */ | |
658 | WID_11N_PROT_MECH = 0x0080, | |
659 | ||
660 | /* ERP Protection type for MAC */ | |
661 | /* -------------------------------------------------------------- */ | |
662 | /* Configuration : Self-CTS RTS-CTS */ | |
663 | /* Values to set : 0 1 */ | |
664 | /* -------------------------------------------------------------- */ | |
665 | WID_11N_ERP_PROT_TYPE = 0x0081, | |
666 | ||
667 | /* HT Option Enable */ | |
668 | /* -------------------------------------------------------------- */ | |
669 | /* Configuration : HT Enable HT Disable */ | |
670 | /* Values to set : 1 0 */ | |
671 | /* -------------------------------------------------------------- */ | |
672 | WID_11N_ENABLE = 0x0082, | |
673 | ||
674 | /* 11n Operating mode (Note that 11g operating mode will also be */ | |
675 | /* used in addition to this, if this is set to HT Mixed mode) */ | |
676 | /* -------------------------------------------------------------- */ | |
677 | /* Configuration : HT Mixed HT Only-20MHz HT Only-20/40MHz */ | |
678 | /* Values to set : 1 2 3 */ | |
679 | /* -------------------------------------------------------------- */ | |
680 | WID_11N_OPERATING_MODE = 0x0083, | |
681 | ||
682 | /* 11n OBSS non-HT STA Detection flag */ | |
683 | /* -------------------------------------------------------------- */ | |
684 | /* Configuration : Do not detect */ | |
685 | /* Values to set : 0 */ | |
686 | /* Configuration : Detect, do not protect or report */ | |
687 | /* Values to set : 1 */ | |
688 | /* Configuration : Detect, protect and do not report */ | |
689 | /* Values to set : 2 */ | |
690 | /* Configuration : Detect, protect and report to other BSS */ | |
691 | /* Values to set : 3 */ | |
692 | /* -------------------------------------------------------------- */ | |
693 | WID_11N_OBSS_NONHT_DETECTION = 0x0084, | |
694 | ||
695 | /* 11n HT Protection Type */ | |
696 | /* -------------------------------------------------------------- */ | |
697 | /* Configuration : RTS-CTS First Frame Exchange at non-HT-rate */ | |
698 | /* Values to set : 0 1 */ | |
699 | /* Configuration : LSIG TXOP First Frame Exchange in Mixed Fmt */ | |
700 | /* Values to set : 2 3 */ | |
701 | /* -------------------------------------------------------------- */ | |
702 | WID_11N_HT_PROT_TYPE = 0x0085, | |
703 | ||
704 | /* 11n RIFS Protection Enable Flag */ | |
705 | /* -------------------------------------------------------------- */ | |
706 | /* Configuration : Disable Enable */ | |
707 | /* Values to set : 0 1 */ | |
708 | /* -------------------------------------------------------------- */ | |
709 | WID_11N_RIFS_PROT_ENABLE = 0x0086, | |
710 | ||
711 | /* SMPS Mode */ | |
712 | /* -------------------------------------------------------------- */ | |
713 | /* Configuration : Static Dynamic MIMO (Power Save Disabled) */ | |
714 | /* Values to set : 1 2 3 */ | |
715 | /* -------------------------------------------------------------- */ | |
716 | WID_11N_SMPS_MODE = 0x0087, | |
717 | ||
718 | /* Current transmit MCS */ | |
719 | /* -------------------------------------------------------------- */ | |
720 | /* Configuration : MCS Index for data rate */ | |
721 | /* Values to set : 0 to 7 */ | |
722 | /* -------------------------------------------------------------- */ | |
723 | WID_11N_CURRENT_TX_MCS = 0x0088, | |
724 | ||
725 | WID_11N_PRINT_STATS = 0x0089, | |
726 | ||
727 | /* 11n Short GI Enable Flag */ | |
728 | /* -------------------------------------------------------------- */ | |
729 | /* Configuration : Disable Enable */ | |
730 | /* Values to set : 0 1 */ | |
731 | /* -------------------------------------------------------------- */ | |
732 | WID_11N_SHORT_GI_ENABLE = 0x008D, | |
733 | ||
734 | /* 11n RIFS Enable Flag */ | |
735 | /* -------------------------------------------------------------- */ | |
736 | /* Configuration : Disable Enable */ | |
737 | /* Values to set : 0 1 */ | |
738 | /* -------------------------------------------------------------- */ | |
739 | WID_RIFS_MODE = 0x0094, | |
740 | ||
741 | /* TX Abort Feature */ | |
742 | /* -------------------------------------------------------------- */ | |
743 | /* Configuration : Disable Self CTS Enable Self CTS */ | |
744 | /* Values to set : 0 1 */ | |
745 | /* Configuration : Disable TX Abort Enable TX Abort */ | |
746 | /* Values to set : 2 3 */ | |
747 | /* Configuration : Enable HW TX Abort Enable SW TX Abort */ | |
748 | /* Values to set : 4 5 */ | |
749 | /* -------------------------------------------------------------- */ | |
750 | WID_TX_ABORT_CONFIG = 0x00A1, | |
751 | ||
752 | WID_REG_TSSI_11B_VALUE = 0x00A6, | |
753 | WID_REG_TSSI_11G_VALUE = 0x00A7, | |
754 | WID_REG_TSSI_11N_VALUE = 0x00A8, | |
755 | WID_TX_CALIBRATION = 0x00A9, | |
756 | WID_DSCR_TSSI_11B_VALUE = 0x00AA, | |
757 | WID_DSCR_TSSI_11G_VALUE = 0x00AB, | |
758 | WID_DSCR_TSSI_11N_VALUE = 0x00AC, | |
759 | ||
760 | /* Immediate Block-Ack Support */ | |
761 | /* -------------------------------------------------------------- */ | |
762 | /* Configuration : Disable Enable */ | |
763 | /* Values to set : 0 1 */ | |
764 | /* -------------------------------------------------------------- */ | |
765 | WID_11N_IMMEDIATE_BA_ENABLED = 0x00AF, | |
766 | ||
767 | /* TXOP Disable Flag */ | |
768 | /* -------------------------------------------------------------- */ | |
769 | /* Configuration : Disable Enable */ | |
770 | /* Values to set : 1 0 */ | |
771 | /* -------------------------------------------------------------- */ | |
772 | WID_11N_TXOP_PROT_DISABLE = 0x00B0, | |
773 | ||
774 | ||
775 | WID_TX_POWER_LEVEL_11N = 0x00B1, | |
776 | ||
777 | /* Custom Character WID list */ | |
778 | WID_PC_TEST_MODE = 0x00C8, | |
779 | /*bug3819: */ | |
780 | /* SCAN Complete notification WID*/ | |
781 | WID_SCAN_COMPLETE = 0x00C9, | |
782 | ||
783 | #ifdef WILC_AP_EXTERNAL_MLME | |
784 | WID_DEL_BEACON = 0x00CA, | |
785 | #endif | |
786 | ||
787 | WID_LOGTerminal_Switch = 0x00CD, | |
788 | /* EMAC Short WID list */ | |
789 | /* RTS Threshold */ | |
790 | /* -------------------------------------------------------------- */ | |
791 | /* Configuration : Any value between 256 to 2347 */ | |
792 | /* Values to set : Same value. Default is 2347 */ | |
793 | /* -------------------------------------------------------------- */ | |
794 | WID_RTS_THRESHOLD = 0x1000, | |
795 | ||
796 | /* Fragmentation Threshold */ | |
797 | /* -------------------------------------------------------------- */ | |
798 | /* Configuration : Any value between 256 to 2346 */ | |
799 | /* Values to set : Same value. Default is 2346 */ | |
800 | /* -------------------------------------------------------------- */ | |
801 | WID_FRAG_THRESHOLD = 0x1001, | |
802 | ||
803 | WID_SHORT_RETRY_LIMIT = 0x1002, | |
804 | WID_LONG_RETRY_LIMIT = 0x1003, | |
805 | WID_BEACON_INTERVAL = 0x1006, | |
806 | WID_MEMORY_ACCESS_16BIT = 0x1008, | |
807 | WID_RX_SENSE = 0x100B, | |
808 | WID_ACTIVE_SCAN_TIME = 0x100C, | |
809 | WID_PASSIVE_SCAN_TIME = 0x100D, | |
810 | ||
811 | WID_SITE_SURVEY_SCAN_TIME = 0x100E, | |
812 | WID_JOIN_START_TIMEOUT = 0x100F, | |
813 | WID_AUTH_TIMEOUT = 0x1010, | |
814 | WID_ASOC_TIMEOUT = 0x1011, | |
815 | WID_11I_PROTOCOL_TIMEOUT = 0x1012, | |
816 | WID_EAPOL_RESPONSE_TIMEOUT = 0x1013, | |
817 | ||
818 | /* NMAC Short WID list */ | |
819 | WID_11N_SIG_QUAL_VAL = 0x1085, | |
820 | WID_CCA_THRESHOLD = 0x1087, | |
821 | ||
822 | /* Custom Short WID list */ | |
823 | ||
824 | /* EMAC Integer WID list */ | |
825 | WID_FAILED_COUNT = 0x2000, | |
826 | WID_RETRY_COUNT = 0x2001, | |
827 | WID_MULTIPLE_RETRY_COUNT = 0x2002, | |
828 | WID_FRAME_DUPLICATE_COUNT = 0x2003, | |
829 | WID_ACK_FAILURE_COUNT = 0x2004, | |
830 | WID_RECEIVED_FRAGMENT_COUNT = 0x2005, | |
831 | WID_MCAST_RECEIVED_FRAME_COUNT = 0x2006, | |
832 | WID_FCS_ERROR_COUNT = 0x2007, | |
833 | WID_SUCCESS_FRAME_COUNT = 0x2008, | |
834 | WID_HUT_TX_COUNT = 0x200A, | |
835 | WID_TX_FRAGMENT_COUNT = 0x200B, | |
836 | WID_TX_MULTICAST_FRAME_COUNT = 0x200C, | |
837 | WID_RTS_SUCCESS_COUNT = 0x200D, | |
838 | WID_RTS_FAILURE_COUNT = 0x200E, | |
839 | WID_WEP_UNDECRYPTABLE_COUNT = 0x200F, | |
840 | WID_REKEY_PERIOD = 0x2010, | |
841 | WID_REKEY_PACKET_COUNT = 0x2011, | |
842 | WID_1X_SERV_ADDR = 0x2012, | |
843 | WID_STACK_IP_ADDR = 0x2013, | |
844 | WID_STACK_NETMASK_ADDR = 0x2014, | |
845 | WID_HW_RX_COUNT = 0x2015, | |
846 | WID_MEMORY_ADDRESS = 0x201E, | |
847 | WID_MEMORY_ACCESS_32BIT = 0x201F, | |
848 | WID_RF_REG_VAL = 0x2021, | |
849 | ||
850 | ||
851 | /* NMAC Integer WID list */ | |
852 | WID_11N_PHY_ACTIVE_REG_VAL = 0x2080, | |
853 | ||
854 | /* Custom Integer WID list */ | |
855 | WID_GET_INACTIVE_TIME = 0x2084, | |
856 | WID_SET_DRV_HANDLER = 0X2085, | |
857 | WID_SET_OPERATION_MODE = 0X2086, | |
858 | /* EMAC String WID list */ | |
859 | WID_SSID = 0x3000, | |
860 | WID_FIRMWARE_VERSION = 0x3001, | |
861 | WID_OPERATIONAL_RATE_SET = 0x3002, | |
862 | WID_BSSID = 0x3003, | |
863 | WID_WEP_KEY_VALUE = 0x3004, | |
864 | WID_11I_PSK = 0x3008, | |
865 | WID_11E_P_ACTION_REQ = 0x3009, | |
866 | WID_1X_KEY = 0x300A, | |
867 | WID_HARDWARE_VERSION = 0x300B, | |
868 | WID_MAC_ADDR = 0x300C, | |
869 | WID_HUT_DEST_ADDR = 0x300D, | |
870 | WID_PHY_VERSION = 0x300F, | |
871 | WID_SUPP_USERNAME = 0x3010, | |
872 | WID_SUPP_PASSWORD = 0x3011, | |
873 | WID_SITE_SURVEY_RESULTS = 0x3012, | |
874 | WID_RX_POWER_LEVEL = 0x3013, | |
875 | WID_DEL_ALL_RX_BA = 0x3014, | |
876 | WID_SET_STA_MAC_INACTIVE_TIME = 0x3017, | |
877 | WID_ADD_WEP_KEY = 0x3019, | |
878 | WID_REMOVE_WEP_KEY = 0x301A, | |
879 | WID_ADD_PTK = 0x301B, | |
880 | WID_ADD_RX_GTK = 0x301C, | |
881 | WID_ADD_TX_GTK = 0x301D, | |
882 | WID_REMOVE_KEY = 0x301E, | |
883 | WID_ASSOC_REQ_INFO = 0x301F, | |
884 | WID_ASSOC_RES_INFO = 0x3020, | |
885 | WID_MANUFACTURER = 0x3026, /*Added for CAPI tool */ | |
886 | WID_MODEL_NAME = 0x3027, /*Added for CAPI tool */ | |
887 | WID_MODEL_NUM = 0x3028, /*Added for CAPI tool */ | |
888 | WID_DEVICE_NAME = 0x3029, /*Added for CAPI tool */ | |
889 | ||
890 | /* NMAC String WID list */ | |
891 | WID_11N_P_ACTION_REQ = 0x3080, | |
892 | WID_HUT_TEST_ID = 0x3081, | |
893 | WID_PMKID_INFO = 0x3082, | |
894 | WID_FIRMWARE_INFO = 0x3083, | |
895 | #ifdef WILC_P2P | |
896 | WID_REGISTER_FRAME = 0x3084, | |
897 | #endif | |
898 | WID_DEL_ALL_STA = 0x3085, | |
899 | #ifdef WILC_P2P | |
900 | WID_REMAIN_ON_CHAN = 0x3996, | |
901 | #endif | |
902 | /*BugID_4156*/ | |
903 | WID_SSID_PROBE_REQ = 0x3997, | |
904 | /*BugID_4124 WID to trigger modified Join Request using SSID and BSSID instead of bssListIdx (used by WID_JOIN_REQ)*/ | |
905 | WID_JOIN_REQ_EXTENDED = 0x3998, | |
906 | ||
907 | /* BugID 4951: WID toset IP address in firmware */ | |
908 | WID_IP_ADDRESS = 0x3999, | |
909 | ||
910 | ||
911 | ||
912 | /* Custom String WID list */ | |
913 | ||
914 | /* EMAC Binary WID list */ | |
915 | WID_UAPSD_CONFIG = 0x4001, | |
916 | WID_UAPSD_STATUS = 0x4002, | |
917 | WID_WMM_AP_AC_PARAMS = 0x4003, | |
918 | WID_WMM_STA_AC_PARAMS = 0x4004, | |
919 | WID_NETWORK_INFO = 0x4005, | |
920 | WID_STA_JOIN_INFO = 0x4006, | |
921 | WID_CONNECTED_STA_LIST = 0x4007, | |
922 | ||
923 | /* NMAC Binary WID list */ | |
924 | WID_11N_AUTORATE_TABLE = 0x4080, | |
925 | ||
926 | ||
927 | /*Added here by Amr - BugID 4134*/ | |
928 | WID_SCAN_CHANNEL_LIST = 0x4084, | |
929 | ||
930 | /*BugID_3746 WID to add IE to be added in next probe request*/ | |
931 | WID_INFO_ELEMENT_PROBE = 0x4085, | |
932 | /*BugID_3746 WID to add IE to be added in next associate request*/ | |
933 | WID_INFO_ELEMENT_ASSOCIATE = 0x4086, | |
934 | WID_ADD_STA = 0X4087, | |
935 | WID_REMOVE_STA = 0X4088, | |
936 | WID_EDIT_STA = 0X4089, | |
937 | WID_ADD_BEACON = 0x408a, | |
938 | ||
939 | /* BugID 5108 */ | |
940 | WID_SETUP_MULTICAST_FILTER = 0x408b, | |
941 | ||
942 | /* Miscellaneous WIDs */ | |
943 | WID_ALL = 0x7FFE, | |
944 | WID_MAX = 0xFFFF | |
945 | } WID_T; | |
946 | ||
947 | int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup); | |
948 | ||
949 | void wilc_bus_set_max_speed(void); | |
950 | void wilc_bus_set_default_speed(void); | |
951 | uint32_t wilc_get_chipid(uint8_t update); | |
952 | ||
953 | ||
954 | #endif |