wl1251_reg.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. /*
  2. * This file is part of wl12xx
  3. *
  4. * Copyright (c) 1998-2007 Texas Instruments Incorporated
  5. * Copyright (C) 2008 Nokia Corporation
  6. *
  7. * Contact: Kalle Valo <kalle.valo@nokia.com>
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * version 2 as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  21. * 02110-1301 USA
  22. *
  23. */
  24. #ifndef __REG_H__
  25. #define __REG_H__
  26. #include <linux/bitops.h>
  27. #define REGISTERS_BASE 0x00300000
  28. #define DRPW_BASE 0x00310000
  29. #define REGISTERS_DOWN_SIZE 0x00008800
  30. #define REGISTERS_WORK_SIZE 0x0000b000
  31. #define HW_ACCESS_ELP_CTRL_REG_ADDR 0x1FFFC
  32. /* ELP register commands */
  33. #define ELPCTRL_WAKE_UP 0x1
  34. #define ELPCTRL_WAKE_UP_WLAN_READY 0x5
  35. #define ELPCTRL_SLEEP 0x0
  36. /* ELP WLAN_READY bit */
  37. #define ELPCTRL_WLAN_READY 0x2
  38. /* Device Configuration registers*/
  39. #define SOR_CFG (REGISTERS_BASE + 0x0800)
  40. #define ECPU_CTRL (REGISTERS_BASE + 0x0804)
  41. #define HI_CFG (REGISTERS_BASE + 0x0808)
  42. /* EEPROM registers */
  43. #define EE_START (REGISTERS_BASE + 0x080C)
  44. #define EE_CTL (REGISTERS_BASE + 0x2000)
  45. #define EE_DATA (REGISTERS_BASE + 0x2004)
  46. #define EE_ADDR (REGISTERS_BASE + 0x2008)
  47. #define EE_CTL_READ 2
  48. #define CHIP_ID_B (REGISTERS_BASE + 0x5674)
  49. #define CHIP_ID_1251_PG10 (0x7010101)
  50. #define CHIP_ID_1251_PG11 (0x7020101)
  51. #define CHIP_ID_1251_PG12 (0x7030101)
  52. #define ENABLE (REGISTERS_BASE + 0x5450)
  53. /* Power Management registers */
  54. #define ELP_CFG_MODE (REGISTERS_BASE + 0x5804)
  55. #define ELP_CMD (REGISTERS_BASE + 0x5808)
  56. #define PLL_CAL_TIME (REGISTERS_BASE + 0x5810)
  57. #define CLK_REQ_TIME (REGISTERS_BASE + 0x5814)
  58. #define CLK_BUF_TIME (REGISTERS_BASE + 0x5818)
  59. #define CFG_PLL_SYNC_CNT (REGISTERS_BASE + 0x5820)
  60. /* Scratch Pad registers*/
  61. #define SCR_PAD0 (REGISTERS_BASE + 0x5608)
  62. #define SCR_PAD1 (REGISTERS_BASE + 0x560C)
  63. #define SCR_PAD2 (REGISTERS_BASE + 0x5610)
  64. #define SCR_PAD3 (REGISTERS_BASE + 0x5614)
  65. #define SCR_PAD4 (REGISTERS_BASE + 0x5618)
  66. #define SCR_PAD4_SET (REGISTERS_BASE + 0x561C)
  67. #define SCR_PAD4_CLR (REGISTERS_BASE + 0x5620)
  68. #define SCR_PAD5 (REGISTERS_BASE + 0x5624)
  69. #define SCR_PAD5_SET (REGISTERS_BASE + 0x5628)
  70. #define SCR_PAD5_CLR (REGISTERS_BASE + 0x562C)
  71. #define SCR_PAD6 (REGISTERS_BASE + 0x5630)
  72. #define SCR_PAD7 (REGISTERS_BASE + 0x5634)
  73. #define SCR_PAD8 (REGISTERS_BASE + 0x5638)
  74. #define SCR_PAD9 (REGISTERS_BASE + 0x563C)
  75. /* Spare registers*/
  76. #define SPARE_A1 (REGISTERS_BASE + 0x0994)
  77. #define SPARE_A2 (REGISTERS_BASE + 0x0998)
  78. #define SPARE_A3 (REGISTERS_BASE + 0x099C)
  79. #define SPARE_A4 (REGISTERS_BASE + 0x09A0)
  80. #define SPARE_A5 (REGISTERS_BASE + 0x09A4)
  81. #define SPARE_A6 (REGISTERS_BASE + 0x09A8)
  82. #define SPARE_A7 (REGISTERS_BASE + 0x09AC)
  83. #define SPARE_A8 (REGISTERS_BASE + 0x09B0)
  84. #define SPARE_B1 (REGISTERS_BASE + 0x5420)
  85. #define SPARE_B2 (REGISTERS_BASE + 0x5424)
  86. #define SPARE_B3 (REGISTERS_BASE + 0x5428)
  87. #define SPARE_B4 (REGISTERS_BASE + 0x542C)
  88. #define SPARE_B5 (REGISTERS_BASE + 0x5430)
  89. #define SPARE_B6 (REGISTERS_BASE + 0x5434)
  90. #define SPARE_B7 (REGISTERS_BASE + 0x5438)
  91. #define SPARE_B8 (REGISTERS_BASE + 0x543C)
  92. enum wl12xx_acx_int_reg {
  93. ACX_REG_INTERRUPT_TRIG,
  94. ACX_REG_INTERRUPT_TRIG_H,
  95. /*=============================================
  96. Host Interrupt Mask Register - 32bit (RW)
  97. ------------------------------------------
  98. Setting a bit in this register masks the
  99. corresponding interrupt to the host.
  100. 0 - RX0 - Rx first dubble buffer Data Interrupt
  101. 1 - TXD - Tx Data Interrupt
  102. 2 - TXXFR - Tx Transfer Interrupt
  103. 3 - RX1 - Rx second dubble buffer Data Interrupt
  104. 4 - RXXFR - Rx Transfer Interrupt
  105. 5 - EVENT_A - Event Mailbox interrupt
  106. 6 - EVENT_B - Event Mailbox interrupt
  107. 7 - WNONHST - Wake On Host Interrupt
  108. 8 - TRACE_A - Debug Trace interrupt
  109. 9 - TRACE_B - Debug Trace interrupt
  110. 10 - CDCMP - Command Complete Interrupt
  111. 11 -
  112. 12 -
  113. 13 -
  114. 14 - ICOMP - Initialization Complete Interrupt
  115. 16 - SG SE - Soft Gemini - Sense enable interrupt
  116. 17 - SG SD - Soft Gemini - Sense disable interrupt
  117. 18 - -
  118. 19 - -
  119. 20 - -
  120. 21- -
  121. Default: 0x0001
  122. *==============================================*/
  123. ACX_REG_INTERRUPT_MASK,
  124. /*=============================================
  125. Host Interrupt Mask Set 16bit, (Write only)
  126. ------------------------------------------
  127. Setting a bit in this register sets
  128. the corresponding bin in ACX_HINT_MASK register
  129. without effecting the mask
  130. state of other bits (0 = no effect).
  131. ==============================================*/
  132. ACX_REG_HINT_MASK_SET,
  133. /*=============================================
  134. Host Interrupt Mask Clear 16bit,(Write only)
  135. ------------------------------------------
  136. Setting a bit in this register clears
  137. the corresponding bin in ACX_HINT_MASK register
  138. without effecting the mask
  139. state of other bits (0 = no effect).
  140. =============================================*/
  141. ACX_REG_HINT_MASK_CLR,
  142. /*=============================================
  143. Host Interrupt Status Nondestructive Read
  144. 16bit,(Read only)
  145. ------------------------------------------
  146. The host can read this register to determine
  147. which interrupts are active.
  148. Reading this register doesn't
  149. effect its content.
  150. =============================================*/
  151. ACX_REG_INTERRUPT_NO_CLEAR,
  152. /*=============================================
  153. Host Interrupt Status Clear on Read Register
  154. 16bit,(Read only)
  155. ------------------------------------------
  156. The host can read this register to determine
  157. which interrupts are active.
  158. Reading this register clears it,
  159. thus making all interrupts inactive.
  160. ==============================================*/
  161. ACX_REG_INTERRUPT_CLEAR,
  162. /*=============================================
  163. Host Interrupt Acknowledge Register
  164. 16bit,(Write only)
  165. ------------------------------------------
  166. The host can set individual bits in this
  167. register to clear (acknowledge) the corresp.
  168. interrupt status bits in the HINT_STS_CLR and
  169. HINT_STS_ND registers, thus making the
  170. assotiated interrupt inactive. (0-no effect)
  171. ==============================================*/
  172. ACX_REG_INTERRUPT_ACK,
  173. /*===============================================
  174. Host Software Reset - 32bit RW
  175. ------------------------------------------
  176. [31:1] Reserved
  177. 0 SOFT_RESET Soft Reset - When this bit is set,
  178. it holds the Wlan hardware in a soft reset state.
  179. This reset disables all MAC and baseband processor
  180. clocks except the CardBus/PCI interface clock.
  181. It also initializes all MAC state machines except
  182. the host interface. It does not reload the
  183. contents of the EEPROM. When this bit is cleared
  184. (not self-clearing), the Wlan hardware
  185. exits the software reset state.
  186. ===============================================*/
  187. ACX_REG_SLV_SOFT_RESET,
  188. /*===============================================
  189. EEPROM Burst Read Start - 32bit RW
  190. ------------------------------------------
  191. [31:1] Reserved
  192. 0 ACX_EE_START - EEPROM Burst Read Start 0
  193. Setting this bit starts a burst read from
  194. the external EEPROM.
  195. If this bit is set (after reset) before an EEPROM read/write,
  196. the burst read starts at EEPROM address 0.
  197. Otherwise, it starts at the address
  198. following the address of the previous access.
  199. TheWlan hardware hardware clears this bit automatically.
  200. Default: 0x00000000
  201. *================================================*/
  202. ACX_REG_EE_START,
  203. /* Embedded ARM CPU Control */
  204. /*===============================================
  205. Halt eCPU - 32bit RW
  206. ------------------------------------------
  207. 0 HALT_ECPU Halt Embedded CPU - This bit is the
  208. compliment of bit 1 (MDATA2) in the SOR_CFG register.
  209. During a hardware reset, this bit holds
  210. the inverse of MDATA2.
  211. When downloading firmware from the host,
  212. set this bit (pull down MDATA2).
  213. The host clears this bit after downloading the firmware into
  214. zero-wait-state SSRAM.
  215. When loading firmware from Flash, clear this bit (pull up MDATA2)
  216. so that the eCPU can run the bootloader code in Flash
  217. HALT_ECPU eCPU State
  218. --------------------
  219. 1 halt eCPU
  220. 0 enable eCPU
  221. ===============================================*/
  222. ACX_REG_ECPU_CONTROL,
  223. ACX_REG_TABLE_LEN
  224. };
  225. #define ACX_SLV_SOFT_RESET_BIT BIT(0)
  226. #define ACX_REG_EEPROM_START_BIT BIT(0)
  227. /* Command/Information Mailbox Pointers */
  228. /*===============================================
  229. Command Mailbox Pointer - 32bit RW
  230. ------------------------------------------
  231. This register holds the start address of
  232. the command mailbox located in the Wlan hardware memory.
  233. The host must read this pointer after a reset to
  234. find the location of the command mailbox.
  235. The Wlan hardware initializes the command mailbox
  236. pointer with the default address of the command mailbox.
  237. The command mailbox pointer is not valid until after
  238. the host receives the Init Complete interrupt from
  239. the Wlan hardware.
  240. ===============================================*/
  241. #define REG_COMMAND_MAILBOX_PTR (SCR_PAD0)
  242. /*===============================================
  243. Information Mailbox Pointer - 32bit RW
  244. ------------------------------------------
  245. This register holds the start address of
  246. the information mailbox located in the Wlan hardware memory.
  247. The host must read this pointer after a reset to find
  248. the location of the information mailbox.
  249. The Wlan hardware initializes the information mailbox pointer
  250. with the default address of the information mailbox.
  251. The information mailbox pointer is not valid
  252. until after the host receives the Init Complete interrupt from
  253. the Wlan hardware.
  254. ===============================================*/
  255. #define REG_EVENT_MAILBOX_PTR (SCR_PAD1)
  256. /* Misc */
  257. #define REG_ENABLE_TX_RX (ENABLE)
  258. /*
  259. * Rx configuration (filter) information element
  260. * ---------------------------------------------
  261. */
  262. #define REG_RX_CONFIG (RX_CFG)
  263. #define REG_RX_FILTER (RX_FILTER_CFG)
  264. #define RX_CFG_ENABLE_PHY_HEADER_PLCP 0x0002
  265. /* promiscuous - receives all valid frames */
  266. #define RX_CFG_PROMISCUOUS 0x0008
  267. /* receives frames from any BSSID */
  268. #define RX_CFG_BSSID 0x0020
  269. /* receives frames destined to any MAC address */
  270. #define RX_CFG_MAC 0x0010
  271. #define RX_CFG_ENABLE_ONLY_MY_DEST_MAC 0x0010
  272. #define RX_CFG_ENABLE_ANY_DEST_MAC 0x0000
  273. #define RX_CFG_ENABLE_ONLY_MY_BSSID 0x0020
  274. #define RX_CFG_ENABLE_ANY_BSSID 0x0000
  275. /* discards all broadcast frames */
  276. #define RX_CFG_DISABLE_BCAST 0x0200
  277. #define RX_CFG_ENABLE_ONLY_MY_SSID 0x0400
  278. #define RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR 0x0800
  279. #define RX_CFG_COPY_RX_STATUS 0x2000
  280. #define RX_CFG_TSF 0x10000
  281. #define RX_CONFIG_OPTION_ANY_DST_MY_BSS (RX_CFG_ENABLE_ANY_DEST_MAC | \
  282. RX_CFG_ENABLE_ONLY_MY_BSSID)
  283. #define RX_CONFIG_OPTION_MY_DST_ANY_BSS (RX_CFG_ENABLE_ONLY_MY_DEST_MAC\
  284. | RX_CFG_ENABLE_ANY_BSSID)
  285. #define RX_CONFIG_OPTION_ANY_DST_ANY_BSS (RX_CFG_ENABLE_ANY_DEST_MAC | \
  286. RX_CFG_ENABLE_ANY_BSSID)
  287. #define RX_CONFIG_OPTION_MY_DST_MY_BSS (RX_CFG_ENABLE_ONLY_MY_DEST_MAC\
  288. | RX_CFG_ENABLE_ONLY_MY_BSSID)
  289. #define RX_CONFIG_OPTION_FOR_SCAN (RX_CFG_ENABLE_PHY_HEADER_PLCP \
  290. | RX_CFG_ENABLE_RX_CMPLT_FCS_ERROR \
  291. | RX_CFG_COPY_RX_STATUS | RX_CFG_TSF)
  292. #define RX_CONFIG_OPTION_FOR_MEASUREMENT (RX_CFG_ENABLE_ANY_DEST_MAC)
  293. #define RX_CONFIG_OPTION_FOR_JOIN (RX_CFG_ENABLE_ONLY_MY_BSSID | \
  294. RX_CFG_ENABLE_ONLY_MY_DEST_MAC)
  295. #define RX_CONFIG_OPTION_FOR_IBSS_JOIN (RX_CFG_ENABLE_ONLY_MY_SSID | \
  296. RX_CFG_ENABLE_ONLY_MY_DEST_MAC)
  297. #define RX_FILTER_OPTION_DEF (CFG_RX_MGMT_EN | CFG_RX_DATA_EN\
  298. | CFG_RX_CTL_EN | CFG_RX_BCN_EN\
  299. | CFG_RX_AUTH_EN | CFG_RX_ASSOC_EN)
  300. #define RX_FILTER_OPTION_FILTER_ALL 0
  301. #define RX_FILTER_OPTION_DEF_PRSP_BCN (CFG_RX_PRSP_EN | CFG_RX_MGMT_EN\
  302. | CFG_RX_RCTS_ACK | CFG_RX_BCN_EN)
  303. #define RX_FILTER_OPTION_JOIN (CFG_RX_MGMT_EN | CFG_RX_DATA_EN\
  304. | CFG_RX_BCN_EN | CFG_RX_AUTH_EN\
  305. | CFG_RX_ASSOC_EN | CFG_RX_RCTS_ACK\
  306. | CFG_RX_PRSP_EN)
  307. /*===============================================
  308. EEPROM Read/Write Request 32bit RW
  309. ------------------------------------------
  310. 1 EE_READ - EEPROM Read Request 1 - Setting this bit
  311. loads a single byte of data into the EE_DATA
  312. register from the EEPROM location specified in
  313. the EE_ADDR register.
  314. The Wlan hardware hardware clears this bit automatically.
  315. EE_DATA is valid when this bit is cleared.
  316. 0 EE_WRITE - EEPROM Write Request - Setting this bit
  317. writes a single byte of data from the EE_DATA register into the
  318. EEPROM location specified in the EE_ADDR register.
  319. The Wlan hardware hardware clears this bit automatically.
  320. *===============================================*/
  321. #define EE_CTL (REGISTERS_BASE + 0x2000)
  322. #define ACX_EE_CTL_REG EE_CTL
  323. #define EE_WRITE 0x00000001ul
  324. #define EE_READ 0x00000002ul
  325. /*===============================================
  326. EEPROM Address - 32bit RW
  327. ------------------------------------------
  328. This register specifies the address
  329. within the EEPROM from/to which to read/write data.
  330. ===============================================*/
  331. #define EE_ADDR (REGISTERS_BASE + 0x2008)
  332. #define ACX_EE_ADDR_REG EE_ADDR
  333. /*===============================================
  334. EEPROM Data - 32bit RW
  335. ------------------------------------------
  336. This register either holds the read 8 bits of
  337. data from the EEPROM or the write data
  338. to be written to the EEPROM.
  339. ===============================================*/
  340. #define EE_DATA (REGISTERS_BASE + 0x2004)
  341. #define ACX_EE_DATA_REG EE_DATA
  342. #define EEPROM_ACCESS_TO 10000 /* timeout counter */
  343. #define START_EEPROM_MGR 0x00000001
  344. /*===============================================
  345. EEPROM Base Address - 32bit RW
  346. ------------------------------------------
  347. This register holds the upper nine bits
  348. [23:15] of the 24-bit Wlan hardware memory
  349. address for burst reads from EEPROM accesses.
  350. The EEPROM provides the lower 15 bits of this address.
  351. The MSB of the address from the EEPROM is ignored.
  352. ===============================================*/
  353. #define ACX_EE_CFG EE_CFG
  354. /*===============================================
  355. GPIO Output Values -32bit, RW
  356. ------------------------------------------
  357. [31:16] Reserved
  358. [15: 0] Specify the output values (at the output driver inputs) for
  359. GPIO[15:0], respectively.
  360. ===============================================*/
  361. #define ACX_GPIO_OUT_REG GPIO_OUT
  362. #define ACX_MAX_GPIO_LINES 15
  363. /*===============================================
  364. Contention window -32bit, RW
  365. ------------------------------------------
  366. [31:26] Reserved
  367. [25:16] Max (0x3ff)
  368. [15:07] Reserved
  369. [06:00] Current contention window value - default is 0x1F
  370. ===============================================*/
  371. #define ACX_CONT_WIND_CFG_REG CONT_WIND_CFG
  372. #define ACX_CONT_WIND_MIN_MASK 0x0000007f
  373. #define ACX_CONT_WIND_MAX 0x03ff0000
  374. /*===============================================
  375. HI_CFG Interface Configuration Register Values
  376. ------------------------------------------
  377. ===============================================*/
  378. #define HI_CFG_UART_ENABLE 0x00000004
  379. #define HI_CFG_RST232_ENABLE 0x00000008
  380. #define HI_CFG_CLOCK_REQ_SELECT 0x00000010
  381. #define HI_CFG_HOST_INT_ENABLE 0x00000020
  382. #define HI_CFG_VLYNQ_OUTPUT_ENABLE 0x00000040
  383. #define HI_CFG_HOST_INT_ACTIVE_LOW 0x00000080
  384. #define HI_CFG_UART_TX_OUT_GPIO_15 0x00000100
  385. #define HI_CFG_UART_TX_OUT_GPIO_14 0x00000200
  386. #define HI_CFG_UART_TX_OUT_GPIO_7 0x00000400
  387. /*
  388. * NOTE: USE_ACTIVE_HIGH compilation flag should be defined in makefile
  389. * for platforms using active high interrupt level
  390. */
  391. #ifdef USE_ACTIVE_HIGH
  392. #define HI_CFG_DEF_VAL \
  393. (HI_CFG_UART_ENABLE | \
  394. HI_CFG_RST232_ENABLE | \
  395. HI_CFG_CLOCK_REQ_SELECT | \
  396. HI_CFG_HOST_INT_ENABLE)
  397. #else
  398. #define HI_CFG_DEF_VAL \
  399. (HI_CFG_UART_ENABLE | \
  400. HI_CFG_RST232_ENABLE | \
  401. HI_CFG_CLOCK_REQ_SELECT | \
  402. HI_CFG_HOST_INT_ENABLE)
  403. #endif
  404. #define REF_FREQ_19_2 0
  405. #define REF_FREQ_26_0 1
  406. #define REF_FREQ_38_4 2
  407. #define REF_FREQ_40_0 3
  408. #define REF_FREQ_33_6 4
  409. #define REF_FREQ_NUM 5
  410. #define LUT_PARAM_INTEGER_DIVIDER 0
  411. #define LUT_PARAM_FRACTIONAL_DIVIDER 1
  412. #define LUT_PARAM_ATTN_BB 2
  413. #define LUT_PARAM_ALPHA_BB 3
  414. #define LUT_PARAM_STOP_TIME_BB 4
  415. #define LUT_PARAM_BB_PLL_LOOP_FILTER 5
  416. #define LUT_PARAM_NUM 6
  417. #define ACX_EEPROMLESS_IND_REG (SCR_PAD4)
  418. #define USE_EEPROM 0
  419. #define SOFT_RESET_MAX_TIME 1000000
  420. #define SOFT_RESET_STALL_TIME 1000
  421. #define NVS_DATA_BUNDARY_ALIGNMENT 4
  422. /* Firmware image load chunk size */
  423. #define CHUNK_SIZE 512
  424. /* Firmware image header size */
  425. #define FW_HDR_SIZE 8
  426. #define ECPU_CONTROL_HALT 0x00000101
  427. /******************************************************************************
  428. CHANNELS, BAND & REG DOMAINS definitions
  429. ******************************************************************************/
  430. enum {
  431. RADIO_BAND_2_4GHZ = 0, /* 2.4 Ghz band */
  432. RADIO_BAND_5GHZ = 1, /* 5 Ghz band */
  433. RADIO_BAND_JAPAN_4_9_GHZ = 2,
  434. DEFAULT_BAND = RADIO_BAND_2_4GHZ,
  435. INVALID_BAND = 0xFE,
  436. MAX_RADIO_BANDS = 0xFF
  437. };
  438. enum {
  439. NO_RATE = 0,
  440. RATE_1MBPS = 0x0A,
  441. RATE_2MBPS = 0x14,
  442. RATE_5_5MBPS = 0x37,
  443. RATE_6MBPS = 0x0B,
  444. RATE_9MBPS = 0x0F,
  445. RATE_11MBPS = 0x6E,
  446. RATE_12MBPS = 0x0A,
  447. RATE_18MBPS = 0x0E,
  448. RATE_22MBPS = 0xDC,
  449. RATE_24MBPS = 0x09,
  450. RATE_36MBPS = 0x0D,
  451. RATE_48MBPS = 0x08,
  452. RATE_54MBPS = 0x0C
  453. };
  454. enum {
  455. RATE_INDEX_1MBPS = 0,
  456. RATE_INDEX_2MBPS = 1,
  457. RATE_INDEX_5_5MBPS = 2,
  458. RATE_INDEX_6MBPS = 3,
  459. RATE_INDEX_9MBPS = 4,
  460. RATE_INDEX_11MBPS = 5,
  461. RATE_INDEX_12MBPS = 6,
  462. RATE_INDEX_18MBPS = 7,
  463. RATE_INDEX_22MBPS = 8,
  464. RATE_INDEX_24MBPS = 9,
  465. RATE_INDEX_36MBPS = 10,
  466. RATE_INDEX_48MBPS = 11,
  467. RATE_INDEX_54MBPS = 12,
  468. RATE_INDEX_MAX = RATE_INDEX_54MBPS,
  469. MAX_RATE_INDEX,
  470. INVALID_RATE_INDEX = MAX_RATE_INDEX,
  471. RATE_INDEX_ENUM_MAX_SIZE = 0x7FFFFFFF
  472. };
  473. enum {
  474. RATE_MASK_1MBPS = 0x1,
  475. RATE_MASK_2MBPS = 0x2,
  476. RATE_MASK_5_5MBPS = 0x4,
  477. RATE_MASK_11MBPS = 0x20,
  478. };
  479. #define SHORT_PREAMBLE_BIT BIT(0) /* CCK or Barker depending on the rate */
  480. #define OFDM_RATE_BIT BIT(6)
  481. #define PBCC_RATE_BIT BIT(7)
  482. enum {
  483. CCK_LONG = 0,
  484. CCK_SHORT = SHORT_PREAMBLE_BIT,
  485. PBCC_LONG = PBCC_RATE_BIT,
  486. PBCC_SHORT = PBCC_RATE_BIT | SHORT_PREAMBLE_BIT,
  487. OFDM = OFDM_RATE_BIT
  488. };
  489. /******************************************************************************
  490. Transmit-Descriptor RATE-SET field definitions...
  491. Define a new "Rate-Set" for TX path that incorporates the
  492. Rate & Modulation info into a single 16-bit field.
  493. TxdRateSet_t:
  494. b15 - Indicates Preamble type (1=SHORT, 0=LONG).
  495. Notes:
  496. Must be LONG (0) for 1Mbps rate.
  497. Does not apply (set to 0) for RevG-OFDM rates.
  498. b14 - Indicates PBCC encoding (1=PBCC, 0=not).
  499. Notes:
  500. Does not apply (set to 0) for rates 1 and 2 Mbps.
  501. Does not apply (set to 0) for RevG-OFDM rates.
  502. b13 - Unused (set to 0).
  503. b12-b0 - Supported Rate indicator bits as defined below.
  504. ******************************************************************************/
  505. /*************************************************************************
  506. Interrupt Trigger Register (Host -> WiLink)
  507. **************************************************************************/
  508. /* Hardware to Embedded CPU Interrupts - first 32-bit register set */
  509. /*
  510. * Host Command Interrupt. Setting this bit masks
  511. * the interrupt that the host issues to inform
  512. * the FW that it has sent a command
  513. * to the Wlan hardware Command Mailbox.
  514. */
  515. #define INTR_TRIG_CMD BIT(0)
  516. /*
  517. * Host Event Acknowlegde Interrupt. The host
  518. * sets this bit to acknowledge that it received
  519. * the unsolicited information from the event
  520. * mailbox.
  521. */
  522. #define INTR_TRIG_EVENT_ACK BIT(1)
  523. /*
  524. * The host sets this bit to inform the Wlan
  525. * FW that a TX packet is in the XFER
  526. * Buffer #0.
  527. */
  528. #define INTR_TRIG_TX_PROC0 BIT(2)
  529. /*
  530. * The host sets this bit to inform the FW
  531. * that it read a packet from RX XFER
  532. * Buffer #0.
  533. */
  534. #define INTR_TRIG_RX_PROC0 BIT(3)
  535. #define INTR_TRIG_DEBUG_ACK BIT(4)
  536. #define INTR_TRIG_STATE_CHANGED BIT(5)
  537. /* Hardware to Embedded CPU Interrupts - second 32-bit register set */
  538. /*
  539. * The host sets this bit to inform the FW
  540. * that it read a packet from RX XFER
  541. * Buffer #1.
  542. */
  543. #define INTR_TRIG_RX_PROC1 BIT(17)
  544. /*
  545. * The host sets this bit to inform the Wlan
  546. * hardware that a TX packet is in the XFER
  547. * Buffer #1.
  548. */
  549. #define INTR_TRIG_TX_PROC1 BIT(18)
  550. #endif