wilc_wlan_if.h 26 KB

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