wl1251_acx.h 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411
  1. /*
  2. * This file is part of wl1251
  3. *
  4. * Copyright (c) 1998-2007 Texas Instruments Incorporated
  5. * Copyright (C) 2008 Nokia Corporation
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  19. * 02110-1301 USA
  20. *
  21. */
  22. #ifndef __WL1251_ACX_H__
  23. #define __WL1251_ACX_H__
  24. #include "wl1251.h"
  25. #include "wl1251_cmd.h"
  26. /* Target's information element */
  27. struct acx_header {
  28. struct wl1251_cmd_header cmd;
  29. /* acx (or information element) header */
  30. u16 id;
  31. /* payload length (not including headers */
  32. u16 len;
  33. } __packed;
  34. struct acx_error_counter {
  35. struct acx_header header;
  36. /* The number of PLCP errors since the last time this */
  37. /* information element was interrogated. This field is */
  38. /* automatically cleared when it is interrogated.*/
  39. u32 PLCP_error;
  40. /* The number of FCS errors since the last time this */
  41. /* information element was interrogated. This field is */
  42. /* automatically cleared when it is interrogated.*/
  43. u32 FCS_error;
  44. /* The number of MPDUs without PLCP header errors received*/
  45. /* since the last time this information element was interrogated. */
  46. /* This field is automatically cleared when it is interrogated.*/
  47. u32 valid_frame;
  48. /* the number of missed sequence numbers in the squentially */
  49. /* values of frames seq numbers */
  50. u32 seq_num_miss;
  51. } __packed;
  52. struct acx_revision {
  53. struct acx_header header;
  54. /*
  55. * The WiLink firmware version, an ASCII string x.x.x.x,
  56. * that uniquely identifies the current firmware.
  57. * The left most digit is incremented each time a
  58. * significant change is made to the firmware, such as
  59. * code redesign or new platform support.
  60. * The second digit is incremented when major enhancements
  61. * are added or major fixes are made.
  62. * The third digit is incremented for each GA release.
  63. * The fourth digit is incremented for each build.
  64. * The first two digits identify a firmware release version,
  65. * in other words, a unique set of features.
  66. * The first three digits identify a GA release.
  67. */
  68. char fw_version[20];
  69. /*
  70. * This 4 byte field specifies the WiLink hardware version.
  71. * bits 0 - 15: Reserved.
  72. * bits 16 - 23: Version ID - The WiLink version ID
  73. * (1 = first spin, 2 = second spin, and so on).
  74. * bits 24 - 31: Chip ID - The WiLink chip ID.
  75. */
  76. u32 hw_version;
  77. } __packed;
  78. enum wl1251_psm_mode {
  79. /* Active mode */
  80. WL1251_PSM_CAM = 0,
  81. /* Power save mode */
  82. WL1251_PSM_PS = 1,
  83. /* Extreme low power */
  84. WL1251_PSM_ELP = 2,
  85. };
  86. struct acx_sleep_auth {
  87. struct acx_header header;
  88. /* The sleep level authorization of the device. */
  89. /* 0 - Always active*/
  90. /* 1 - Power down mode: light / fast sleep*/
  91. /* 2 - ELP mode: Deep / Max sleep*/
  92. u8 sleep_auth;
  93. u8 padding[3];
  94. } __packed;
  95. enum {
  96. HOSTIF_PCI_MASTER_HOST_INDIRECT,
  97. HOSTIF_PCI_MASTER_HOST_DIRECT,
  98. HOSTIF_SLAVE,
  99. HOSTIF_PKT_RING,
  100. HOSTIF_DONTCARE = 0xFF
  101. };
  102. #define DEFAULT_UCAST_PRIORITY 0
  103. #define DEFAULT_RX_Q_PRIORITY 0
  104. #define DEFAULT_NUM_STATIONS 1
  105. #define DEFAULT_RXQ_PRIORITY 0 /* low 0 .. 15 high */
  106. #define DEFAULT_RXQ_TYPE 0x07 /* All frames, Data/Ctrl/Mgmt */
  107. #define TRACE_BUFFER_MAX_SIZE 256
  108. #define DP_RX_PACKET_RING_CHUNK_SIZE 1600
  109. #define DP_TX_PACKET_RING_CHUNK_SIZE 1600
  110. #define DP_RX_PACKET_RING_CHUNK_NUM 2
  111. #define DP_TX_PACKET_RING_CHUNK_NUM 2
  112. #define DP_TX_COMPLETE_TIME_OUT 20
  113. #define FW_TX_CMPLT_BLOCK_SIZE 16
  114. struct acx_data_path_params {
  115. struct acx_header header;
  116. u16 rx_packet_ring_chunk_size;
  117. u16 tx_packet_ring_chunk_size;
  118. u8 rx_packet_ring_chunk_num;
  119. u8 tx_packet_ring_chunk_num;
  120. /*
  121. * Maximum number of packets that can be gathered
  122. * in the TX complete ring before an interrupt
  123. * is generated.
  124. */
  125. u8 tx_complete_threshold;
  126. /* Number of pending TX complete entries in cyclic ring.*/
  127. u8 tx_complete_ring_depth;
  128. /*
  129. * Max num microseconds since a packet enters the TX
  130. * complete ring until an interrupt is generated.
  131. */
  132. u32 tx_complete_timeout;
  133. } __packed;
  134. struct acx_data_path_params_resp {
  135. struct acx_header header;
  136. u16 rx_packet_ring_chunk_size;
  137. u16 tx_packet_ring_chunk_size;
  138. u8 rx_packet_ring_chunk_num;
  139. u8 tx_packet_ring_chunk_num;
  140. u8 pad[2];
  141. u32 rx_packet_ring_addr;
  142. u32 tx_packet_ring_addr;
  143. u32 rx_control_addr;
  144. u32 tx_control_addr;
  145. u32 tx_complete_addr;
  146. } __packed;
  147. #define TX_MSDU_LIFETIME_MIN 0
  148. #define TX_MSDU_LIFETIME_MAX 3000
  149. #define TX_MSDU_LIFETIME_DEF 512
  150. #define RX_MSDU_LIFETIME_MIN 0
  151. #define RX_MSDU_LIFETIME_MAX 0xFFFFFFFF
  152. #define RX_MSDU_LIFETIME_DEF 512000
  153. struct acx_rx_msdu_lifetime {
  154. struct acx_header header;
  155. /*
  156. * The maximum amount of time, in TU, before the
  157. * firmware discards the MSDU.
  158. */
  159. u32 lifetime;
  160. } __packed;
  161. /*
  162. * RX Config Options Table
  163. * Bit Definition
  164. * === ==========
  165. * 31:14 Reserved
  166. * 13 Copy RX Status - when set, write three receive status words
  167. * to top of rx'd MPDUs.
  168. * When cleared, do not write three status words (added rev 1.5)
  169. * 12 Reserved
  170. * 11 RX Complete upon FCS error - when set, give rx complete
  171. * interrupt for FCS errors, after the rx filtering, e.g. unicast
  172. * frames not to us with FCS error will not generate an interrupt.
  173. * 10 SSID Filter Enable - When set, the WiLink discards all beacon,
  174. * probe request, and probe response frames with an SSID that does
  175. * not match the SSID specified by the host in the START/JOIN
  176. * command.
  177. * When clear, the WiLink receives frames with any SSID.
  178. * 9 Broadcast Filter Enable - When set, the WiLink discards all
  179. * broadcast frames. When clear, the WiLink receives all received
  180. * broadcast frames.
  181. * 8:6 Reserved
  182. * 5 BSSID Filter Enable - When set, the WiLink discards any frames
  183. * with a BSSID that does not match the BSSID specified by the
  184. * host.
  185. * When clear, the WiLink receives frames from any BSSID.
  186. * 4 MAC Addr Filter - When set, the WiLink discards any frames
  187. * with a destination address that does not match the MAC address
  188. * of the adaptor.
  189. * When clear, the WiLink receives frames destined to any MAC
  190. * address.
  191. * 3 Promiscuous - When set, the WiLink receives all valid frames
  192. * (i.e., all frames that pass the FCS check).
  193. * When clear, only frames that pass the other filters specified
  194. * are received.
  195. * 2 FCS - When set, the WiLink includes the FCS with the received
  196. * frame.
  197. * When cleared, the FCS is discarded.
  198. * 1 PLCP header - When set, write all data from baseband to frame
  199. * buffer including PHY header.
  200. * 0 Reserved - Always equal to 0.
  201. *
  202. * RX Filter Options Table
  203. * Bit Definition
  204. * === ==========
  205. * 31:12 Reserved - Always equal to 0.
  206. * 11 Association - When set, the WiLink receives all association
  207. * related frames (association request/response, reassocation
  208. * request/response, and disassociation). When clear, these frames
  209. * are discarded.
  210. * 10 Auth/De auth - When set, the WiLink receives all authentication
  211. * and de-authentication frames. When clear, these frames are
  212. * discarded.
  213. * 9 Beacon - When set, the WiLink receives all beacon frames.
  214. * When clear, these frames are discarded.
  215. * 8 Contention Free - When set, the WiLink receives all contention
  216. * free frames.
  217. * When clear, these frames are discarded.
  218. * 7 Control - When set, the WiLink receives all control frames.
  219. * When clear, these frames are discarded.
  220. * 6 Data - When set, the WiLink receives all data frames.
  221. * When clear, these frames are discarded.
  222. * 5 FCS Error - When set, the WiLink receives frames that have FCS
  223. * errors.
  224. * When clear, these frames are discarded.
  225. * 4 Management - When set, the WiLink receives all management
  226. * frames.
  227. * When clear, these frames are discarded.
  228. * 3 Probe Request - When set, the WiLink receives all probe request
  229. * frames.
  230. * When clear, these frames are discarded.
  231. * 2 Probe Response - When set, the WiLink receives all probe
  232. * response frames.
  233. * When clear, these frames are discarded.
  234. * 1 RTS/CTS/ACK - When set, the WiLink receives all RTS, CTS and ACK
  235. * frames.
  236. * When clear, these frames are discarded.
  237. * 0 Rsvd Type/Sub Type - When set, the WiLink receives all frames
  238. * that have reserved frame types and sub types as defined by the
  239. * 802.11 specification.
  240. * When clear, these frames are discarded.
  241. */
  242. struct acx_rx_config {
  243. struct acx_header header;
  244. u32 config_options;
  245. u32 filter_options;
  246. } __packed;
  247. enum {
  248. QOS_AC_BE = 0,
  249. QOS_AC_BK,
  250. QOS_AC_VI,
  251. QOS_AC_VO,
  252. QOS_HIGHEST_AC_INDEX = QOS_AC_VO,
  253. };
  254. #define MAX_NUM_OF_AC (QOS_HIGHEST_AC_INDEX+1)
  255. #define FIRST_AC_INDEX QOS_AC_BE
  256. #define MAX_NUM_OF_802_1d_TAGS 8
  257. #define AC_PARAMS_MAX_TSID 15
  258. #define MAX_APSD_CONF 0xffff
  259. #define QOS_TX_HIGH_MIN (0)
  260. #define QOS_TX_HIGH_MAX (100)
  261. #define QOS_TX_HIGH_BK_DEF (25)
  262. #define QOS_TX_HIGH_BE_DEF (35)
  263. #define QOS_TX_HIGH_VI_DEF (35)
  264. #define QOS_TX_HIGH_VO_DEF (35)
  265. #define QOS_TX_LOW_BK_DEF (15)
  266. #define QOS_TX_LOW_BE_DEF (25)
  267. #define QOS_TX_LOW_VI_DEF (25)
  268. #define QOS_TX_LOW_VO_DEF (25)
  269. struct acx_tx_queue_qos_config {
  270. struct acx_header header;
  271. u8 qid;
  272. u8 pad[3];
  273. /* Max number of blocks allowd in the queue */
  274. u16 high_threshold;
  275. /* Lowest memory blocks guaranteed for this queue */
  276. u16 low_threshold;
  277. } __packed;
  278. struct acx_packet_detection {
  279. struct acx_header header;
  280. u32 threshold;
  281. } __packed;
  282. enum acx_slot_type {
  283. SLOT_TIME_LONG = 0,
  284. SLOT_TIME_SHORT = 1,
  285. DEFAULT_SLOT_TIME = SLOT_TIME_SHORT,
  286. MAX_SLOT_TIMES = 0xFF
  287. };
  288. #define STATION_WONE_INDEX 0
  289. struct acx_slot {
  290. struct acx_header header;
  291. u8 wone_index; /* Reserved */
  292. u8 slot_time;
  293. u8 reserved[6];
  294. } __packed;
  295. #define ADDRESS_GROUP_MAX (8)
  296. #define ADDRESS_GROUP_MAX_LEN (ETH_ALEN * ADDRESS_GROUP_MAX)
  297. struct acx_dot11_grp_addr_tbl {
  298. struct acx_header header;
  299. u8 enabled;
  300. u8 num_groups;
  301. u8 pad[2];
  302. u8 mac_table[ADDRESS_GROUP_MAX_LEN];
  303. } __packed;
  304. #define RX_TIMEOUT_PS_POLL_MIN 0
  305. #define RX_TIMEOUT_PS_POLL_MAX (200000)
  306. #define RX_TIMEOUT_PS_POLL_DEF (15)
  307. #define RX_TIMEOUT_UPSD_MIN 0
  308. #define RX_TIMEOUT_UPSD_MAX (200000)
  309. #define RX_TIMEOUT_UPSD_DEF (15)
  310. struct acx_rx_timeout {
  311. struct acx_header header;
  312. /*
  313. * The longest time the STA will wait to receive
  314. * traffic from the AP after a PS-poll has been
  315. * transmitted.
  316. */
  317. u16 ps_poll_timeout;
  318. /*
  319. * The longest time the STA will wait to receive
  320. * traffic from the AP after a frame has been sent
  321. * from an UPSD enabled queue.
  322. */
  323. u16 upsd_timeout;
  324. } __packed;
  325. #define RTS_THRESHOLD_MIN 0
  326. #define RTS_THRESHOLD_MAX 4096
  327. #define RTS_THRESHOLD_DEF 2347
  328. struct acx_rts_threshold {
  329. struct acx_header header;
  330. u16 threshold;
  331. u8 pad[2];
  332. } __packed;
  333. struct acx_beacon_filter_option {
  334. struct acx_header header;
  335. u8 enable;
  336. /*
  337. * The number of beacons without the unicast TIM
  338. * bit set that the firmware buffers before
  339. * signaling the host about ready frames.
  340. * When set to 0 and the filter is enabled, beacons
  341. * without the unicast TIM bit set are dropped.
  342. */
  343. u8 max_num_beacons;
  344. u8 pad[2];
  345. } __packed;
  346. /*
  347. * ACXBeaconFilterEntry (not 221)
  348. * Byte Offset Size (Bytes) Definition
  349. * =========== ============ ==========
  350. * 0 1 IE identifier
  351. * 1 1 Treatment bit mask
  352. *
  353. * ACXBeaconFilterEntry (221)
  354. * Byte Offset Size (Bytes) Definition
  355. * =========== ============ ==========
  356. * 0 1 IE identifier
  357. * 1 1 Treatment bit mask
  358. * 2 3 OUI
  359. * 5 1 Type
  360. * 6 2 Version
  361. *
  362. *
  363. * Treatment bit mask - The information element handling:
  364. * bit 0 - The information element is compared and transferred
  365. * in case of change.
  366. * bit 1 - The information element is transferred to the host
  367. * with each appearance or disappearance.
  368. * Note that both bits can be set at the same time.
  369. */
  370. #define BEACON_FILTER_TABLE_MAX_IE_NUM (32)
  371. #define BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM (6)
  372. #define BEACON_FILTER_TABLE_IE_ENTRY_SIZE (2)
  373. #define BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE (6)
  374. #define BEACON_FILTER_TABLE_MAX_SIZE ((BEACON_FILTER_TABLE_MAX_IE_NUM * \
  375. BEACON_FILTER_TABLE_IE_ENTRY_SIZE) + \
  376. (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
  377. BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
  378. #define BEACON_RULE_PASS_ON_CHANGE BIT(0)
  379. #define BEACON_RULE_PASS_ON_APPEARANCE BIT(1)
  380. #define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN (37)
  381. struct acx_beacon_filter_ie_table {
  382. struct acx_header header;
  383. u8 num_ie;
  384. u8 pad[3];
  385. u8 table[BEACON_FILTER_TABLE_MAX_SIZE];
  386. } __packed;
  387. #define SYNCH_FAIL_DEFAULT_THRESHOLD 10 /* number of beacons */
  388. #define NO_BEACON_DEFAULT_TIMEOUT (500) /* in microseconds */
  389. struct acx_conn_monit_params {
  390. struct acx_header header;
  391. u32 synch_fail_thold; /* number of beacons missed */
  392. u32 bss_lose_timeout; /* number of TU's from synch fail */
  393. } __packed;
  394. enum {
  395. SG_ENABLE = 0,
  396. SG_DISABLE,
  397. SG_SENSE_NO_ACTIVITY,
  398. SG_SENSE_ACTIVE
  399. };
  400. struct acx_bt_wlan_coex {
  401. struct acx_header header;
  402. /*
  403. * 0 -> PTA enabled
  404. * 1 -> PTA disabled
  405. * 2 -> sense no active mode, i.e.
  406. * an interrupt is sent upon
  407. * BT activity.
  408. * 3 -> PTA is switched on in response
  409. * to the interrupt sending.
  410. */
  411. u8 enable;
  412. u8 pad[3];
  413. } __packed;
  414. #define PTA_ANTENNA_TYPE_DEF (0)
  415. #define PTA_BT_HP_MAXTIME_DEF (2000)
  416. #define PTA_WLAN_HP_MAX_TIME_DEF (5000)
  417. #define PTA_SENSE_DISABLE_TIMER_DEF (1350)
  418. #define PTA_PROTECTIVE_RX_TIME_DEF (1500)
  419. #define PTA_PROTECTIVE_TX_TIME_DEF (1500)
  420. #define PTA_TIMEOUT_NEXT_BT_LP_PACKET_DEF (3000)
  421. #define PTA_SIGNALING_TYPE_DEF (1)
  422. #define PTA_AFH_LEVERAGE_ON_DEF (0)
  423. #define PTA_NUMBER_QUIET_CYCLE_DEF (0)
  424. #define PTA_MAX_NUM_CTS_DEF (3)
  425. #define PTA_NUMBER_OF_WLAN_PACKETS_DEF (2)
  426. #define PTA_NUMBER_OF_BT_PACKETS_DEF (2)
  427. #define PTA_PROTECTIVE_RX_TIME_FAST_DEF (1500)
  428. #define PTA_PROTECTIVE_TX_TIME_FAST_DEF (3000)
  429. #define PTA_CYCLE_TIME_FAST_DEF (8700)
  430. #define PTA_RX_FOR_AVALANCHE_DEF (5)
  431. #define PTA_ELP_HP_DEF (0)
  432. #define PTA_ANTI_STARVE_PERIOD_DEF (500)
  433. #define PTA_ANTI_STARVE_NUM_CYCLE_DEF (4)
  434. #define PTA_ALLOW_PA_SD_DEF (1)
  435. #define PTA_TIME_BEFORE_BEACON_DEF (6300)
  436. #define PTA_HPDM_MAX_TIME_DEF (1600)
  437. #define PTA_TIME_OUT_NEXT_WLAN_DEF (2550)
  438. #define PTA_AUTO_MODE_NO_CTS_DEF (0)
  439. #define PTA_BT_HP_RESPECTED_DEF (3)
  440. #define PTA_WLAN_RX_MIN_RATE_DEF (24)
  441. #define PTA_ACK_MODE_DEF (1)
  442. struct acx_bt_wlan_coex_param {
  443. struct acx_header header;
  444. /*
  445. * The minimum rate of a received WLAN packet in the STA,
  446. * during protective mode, of which a new BT-HP request
  447. * during this Rx will always be respected and gain the antenna.
  448. */
  449. u32 min_rate;
  450. /* Max time the BT HP will be respected. */
  451. u16 bt_hp_max_time;
  452. /* Max time the WLAN HP will be respected. */
  453. u16 wlan_hp_max_time;
  454. /*
  455. * The time between the last BT activity
  456. * and the moment when the sense mode returns
  457. * to SENSE_INACTIVE.
  458. */
  459. u16 sense_disable_timer;
  460. /* Time before the next BT HP instance */
  461. u16 rx_time_bt_hp;
  462. u16 tx_time_bt_hp;
  463. /* range: 10-20000 default: 1500 */
  464. u16 rx_time_bt_hp_fast;
  465. u16 tx_time_bt_hp_fast;
  466. /* range: 2000-65535 default: 8700 */
  467. u16 wlan_cycle_fast;
  468. /* range: 0 - 15000 (Msec) default: 1000 */
  469. u16 bt_anti_starvation_period;
  470. /* range 400-10000(Usec) default: 3000 */
  471. u16 next_bt_lp_packet;
  472. /* Deafult: worst case for BT DH5 traffic */
  473. u16 wake_up_beacon;
  474. /* range: 0-50000(Usec) default: 1050 */
  475. u16 hp_dm_max_guard_time;
  476. /*
  477. * This is to prevent both BT & WLAN antenna
  478. * starvation.
  479. * Range: 100-50000(Usec) default:2550
  480. */
  481. u16 next_wlan_packet;
  482. /* 0 -> shared antenna */
  483. u8 antenna_type;
  484. /*
  485. * 0 -> TI legacy
  486. * 1 -> Palau
  487. */
  488. u8 signal_type;
  489. /*
  490. * BT AFH status
  491. * 0 -> no AFH
  492. * 1 -> from dedicated GPIO
  493. * 2 -> AFH on (from host)
  494. */
  495. u8 afh_leverage_on;
  496. /*
  497. * The number of cycles during which no
  498. * TX will be sent after 1 cycle of RX
  499. * transaction in protective mode
  500. */
  501. u8 quiet_cycle_num;
  502. /*
  503. * The maximum number of CTSs that will
  504. * be sent for receiving RX packet in
  505. * protective mode
  506. */
  507. u8 max_cts;
  508. /*
  509. * The number of WLAN packets
  510. * transferred in common mode before
  511. * switching to BT.
  512. */
  513. u8 wlan_packets_num;
  514. /*
  515. * The number of BT packets
  516. * transferred in common mode before
  517. * switching to WLAN.
  518. */
  519. u8 bt_packets_num;
  520. /* range: 1-255 default: 5 */
  521. u8 missed_rx_avalanche;
  522. /* range: 0-1 default: 1 */
  523. u8 wlan_elp_hp;
  524. /* range: 0 - 15 default: 4 */
  525. u8 bt_anti_starvation_cycles;
  526. u8 ack_mode_dual_ant;
  527. /*
  528. * Allow PA_SD assertion/de-assertion
  529. * during enabled BT activity.
  530. */
  531. u8 pa_sd_enable;
  532. /*
  533. * Enable/Disable PTA in auto mode:
  534. * Support Both Active & P.S modes
  535. */
  536. u8 pta_auto_mode_enable;
  537. /* range: 0 - 20 default: 1 */
  538. u8 bt_hp_respected_num;
  539. } __packed;
  540. #define CCA_THRSH_ENABLE_ENERGY_D 0x140A
  541. #define CCA_THRSH_DISABLE_ENERGY_D 0xFFEF
  542. struct acx_energy_detection {
  543. struct acx_header header;
  544. /* The RX Clear Channel Assessment threshold in the PHY */
  545. u16 rx_cca_threshold;
  546. u8 tx_energy_detection;
  547. u8 pad;
  548. } __packed;
  549. #define BCN_RX_TIMEOUT_DEF_VALUE 10000
  550. #define BROADCAST_RX_TIMEOUT_DEF_VALUE 20000
  551. #define RX_BROADCAST_IN_PS_DEF_VALUE 1
  552. #define CONSECUTIVE_PS_POLL_FAILURE_DEF 4
  553. struct acx_beacon_broadcast {
  554. struct acx_header header;
  555. u16 beacon_rx_timeout;
  556. u16 broadcast_timeout;
  557. /* Enables receiving of broadcast packets in PS mode */
  558. u8 rx_broadcast_in_ps;
  559. /* Consecutive PS Poll failures before updating the host */
  560. u8 ps_poll_threshold;
  561. u8 pad[2];
  562. } __packed;
  563. struct acx_event_mask {
  564. struct acx_header header;
  565. u32 event_mask;
  566. u32 high_event_mask; /* Unused */
  567. } __packed;
  568. #define CFG_RX_FCS BIT(2)
  569. #define CFG_RX_ALL_GOOD BIT(3)
  570. #define CFG_UNI_FILTER_EN BIT(4)
  571. #define CFG_BSSID_FILTER_EN BIT(5)
  572. #define CFG_MC_FILTER_EN BIT(6)
  573. #define CFG_MC_ADDR0_EN BIT(7)
  574. #define CFG_MC_ADDR1_EN BIT(8)
  575. #define CFG_BC_REJECT_EN BIT(9)
  576. #define CFG_SSID_FILTER_EN BIT(10)
  577. #define CFG_RX_INT_FCS_ERROR BIT(11)
  578. #define CFG_RX_INT_ENCRYPTED BIT(12)
  579. #define CFG_RX_WR_RX_STATUS BIT(13)
  580. #define CFG_RX_FILTER_NULTI BIT(14)
  581. #define CFG_RX_RESERVE BIT(15)
  582. #define CFG_RX_TIMESTAMP_TSF BIT(16)
  583. #define CFG_RX_RSV_EN BIT(0)
  584. #define CFG_RX_RCTS_ACK BIT(1)
  585. #define CFG_RX_PRSP_EN BIT(2)
  586. #define CFG_RX_PREQ_EN BIT(3)
  587. #define CFG_RX_MGMT_EN BIT(4)
  588. #define CFG_RX_FCS_ERROR BIT(5)
  589. #define CFG_RX_DATA_EN BIT(6)
  590. #define CFG_RX_CTL_EN BIT(7)
  591. #define CFG_RX_CF_EN BIT(8)
  592. #define CFG_RX_BCN_EN BIT(9)
  593. #define CFG_RX_AUTH_EN BIT(10)
  594. #define CFG_RX_ASSOC_EN BIT(11)
  595. #define SCAN_PASSIVE BIT(0)
  596. #define SCAN_5GHZ_BAND BIT(1)
  597. #define SCAN_TRIGGERED BIT(2)
  598. #define SCAN_PRIORITY_HIGH BIT(3)
  599. struct acx_fw_gen_frame_rates {
  600. struct acx_header header;
  601. u8 tx_ctrl_frame_rate; /* RATE_* */
  602. u8 tx_ctrl_frame_mod; /* CCK_* or PBCC_* */
  603. u8 tx_mgt_frame_rate;
  604. u8 tx_mgt_frame_mod;
  605. } __packed;
  606. /* STA MAC */
  607. struct acx_dot11_station_id {
  608. struct acx_header header;
  609. u8 mac[ETH_ALEN];
  610. u8 pad[2];
  611. } __packed;
  612. struct acx_feature_config {
  613. struct acx_header header;
  614. u32 options;
  615. u32 data_flow_options;
  616. } __packed;
  617. struct acx_current_tx_power {
  618. struct acx_header header;
  619. u8 current_tx_power;
  620. u8 padding[3];
  621. } __packed;
  622. struct acx_dot11_default_key {
  623. struct acx_header header;
  624. u8 id;
  625. u8 pad[3];
  626. } __packed;
  627. struct acx_tsf_info {
  628. struct acx_header header;
  629. u32 current_tsf_msb;
  630. u32 current_tsf_lsb;
  631. u32 last_TBTT_msb;
  632. u32 last_TBTT_lsb;
  633. u8 last_dtim_count;
  634. u8 pad[3];
  635. } __packed;
  636. enum acx_wake_up_event {
  637. WAKE_UP_EVENT_BEACON_BITMAP = 0x01, /* Wake on every Beacon*/
  638. WAKE_UP_EVENT_DTIM_BITMAP = 0x02, /* Wake on every DTIM*/
  639. WAKE_UP_EVENT_N_DTIM_BITMAP = 0x04, /* Wake on every Nth DTIM */
  640. WAKE_UP_EVENT_N_BEACONS_BITMAP = 0x08, /* Wake on every Nth Beacon */
  641. WAKE_UP_EVENT_BITS_MASK = 0x0F
  642. };
  643. struct acx_wake_up_condition {
  644. struct acx_header header;
  645. u8 wake_up_event; /* Only one bit can be set */
  646. u8 listen_interval;
  647. u8 pad[2];
  648. } __packed;
  649. struct acx_aid {
  650. struct acx_header header;
  651. /*
  652. * To be set when associated with an AP.
  653. */
  654. u16 aid;
  655. u8 pad[2];
  656. } __packed;
  657. enum acx_preamble_type {
  658. ACX_PREAMBLE_LONG = 0,
  659. ACX_PREAMBLE_SHORT = 1
  660. };
  661. struct acx_preamble {
  662. struct acx_header header;
  663. /*
  664. * When set, the WiLink transmits the frames with a short preamble and
  665. * when cleared, the WiLink transmits the frames with a long preamble.
  666. */
  667. u8 preamble;
  668. u8 padding[3];
  669. } __packed;
  670. enum acx_ctsprotect_type {
  671. CTSPROTECT_DISABLE = 0,
  672. CTSPROTECT_ENABLE = 1
  673. };
  674. struct acx_ctsprotect {
  675. struct acx_header header;
  676. u8 ctsprotect;
  677. u8 padding[3];
  678. } __packed;
  679. struct acx_tx_statistics {
  680. u32 internal_desc_overflow;
  681. } __packed;
  682. struct acx_rx_statistics {
  683. u32 out_of_mem;
  684. u32 hdr_overflow;
  685. u32 hw_stuck;
  686. u32 dropped;
  687. u32 fcs_err;
  688. u32 xfr_hint_trig;
  689. u32 path_reset;
  690. u32 reset_counter;
  691. } __packed;
  692. struct acx_dma_statistics {
  693. u32 rx_requested;
  694. u32 rx_errors;
  695. u32 tx_requested;
  696. u32 tx_errors;
  697. } __packed;
  698. struct acx_isr_statistics {
  699. /* host command complete */
  700. u32 cmd_cmplt;
  701. /* fiqisr() */
  702. u32 fiqs;
  703. /* (INT_STS_ND & INT_TRIG_RX_HEADER) */
  704. u32 rx_headers;
  705. /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */
  706. u32 rx_completes;
  707. /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */
  708. u32 rx_mem_overflow;
  709. /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */
  710. u32 rx_rdys;
  711. /* irqisr() */
  712. u32 irqs;
  713. /* (INT_STS_ND & INT_TRIG_TX_PROC) */
  714. u32 tx_procs;
  715. /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */
  716. u32 decrypt_done;
  717. /* (INT_STS_ND & INT_TRIG_DMA0) */
  718. u32 dma0_done;
  719. /* (INT_STS_ND & INT_TRIG_DMA1) */
  720. u32 dma1_done;
  721. /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */
  722. u32 tx_exch_complete;
  723. /* (INT_STS_ND & INT_TRIG_COMMAND) */
  724. u32 commands;
  725. /* (INT_STS_ND & INT_TRIG_RX_PROC) */
  726. u32 rx_procs;
  727. /* (INT_STS_ND & INT_TRIG_PM_802) */
  728. u32 hw_pm_mode_changes;
  729. /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */
  730. u32 host_acknowledges;
  731. /* (INT_STS_ND & INT_TRIG_PM_PCI) */
  732. u32 pci_pm;
  733. /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */
  734. u32 wakeups;
  735. /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */
  736. u32 low_rssi;
  737. } __packed;
  738. struct acx_wep_statistics {
  739. /* WEP address keys configured */
  740. u32 addr_key_count;
  741. /* default keys configured */
  742. u32 default_key_count;
  743. u32 reserved;
  744. /* number of times that WEP key not found on lookup */
  745. u32 key_not_found;
  746. /* number of times that WEP key decryption failed */
  747. u32 decrypt_fail;
  748. /* WEP packets decrypted */
  749. u32 packets;
  750. /* WEP decrypt interrupts */
  751. u32 interrupt;
  752. } __packed;
  753. #define ACX_MISSED_BEACONS_SPREAD 10
  754. struct acx_pwr_statistics {
  755. /* the amount of enters into power save mode (both PD & ELP) */
  756. u32 ps_enter;
  757. /* the amount of enters into ELP mode */
  758. u32 elp_enter;
  759. /* the amount of missing beacon interrupts to the host */
  760. u32 missing_bcns;
  761. /* the amount of wake on host-access times */
  762. u32 wake_on_host;
  763. /* the amount of wake on timer-expire */
  764. u32 wake_on_timer_exp;
  765. /* the number of packets that were transmitted with PS bit set */
  766. u32 tx_with_ps;
  767. /* the number of packets that were transmitted with PS bit clear */
  768. u32 tx_without_ps;
  769. /* the number of received beacons */
  770. u32 rcvd_beacons;
  771. /* the number of entering into PowerOn (power save off) */
  772. u32 power_save_off;
  773. /* the number of entries into power save mode */
  774. u16 enable_ps;
  775. /*
  776. * the number of exits from power save, not including failed PS
  777. * transitions
  778. */
  779. u16 disable_ps;
  780. /*
  781. * the number of times the TSF counter was adjusted because
  782. * of drift
  783. */
  784. u32 fix_tsf_ps;
  785. /* Gives statistics about the spread continuous missed beacons.
  786. * The 16 LSB are dedicated for the PS mode.
  787. * The 16 MSB are dedicated for the PS mode.
  788. * cont_miss_bcns_spread[0] - single missed beacon.
  789. * cont_miss_bcns_spread[1] - two continuous missed beacons.
  790. * cont_miss_bcns_spread[2] - three continuous missed beacons.
  791. * ...
  792. * cont_miss_bcns_spread[9] - ten and more continuous missed beacons.
  793. */
  794. u32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD];
  795. /* the number of beacons in awake mode */
  796. u32 rcvd_awake_beacons;
  797. } __packed;
  798. struct acx_mic_statistics {
  799. u32 rx_pkts;
  800. u32 calc_failure;
  801. } __packed;
  802. struct acx_aes_statistics {
  803. u32 encrypt_fail;
  804. u32 decrypt_fail;
  805. u32 encrypt_packets;
  806. u32 decrypt_packets;
  807. u32 encrypt_interrupt;
  808. u32 decrypt_interrupt;
  809. } __packed;
  810. struct acx_event_statistics {
  811. u32 heart_beat;
  812. u32 calibration;
  813. u32 rx_mismatch;
  814. u32 rx_mem_empty;
  815. u32 rx_pool;
  816. u32 oom_late;
  817. u32 phy_transmit_error;
  818. u32 tx_stuck;
  819. } __packed;
  820. struct acx_ps_statistics {
  821. u32 pspoll_timeouts;
  822. u32 upsd_timeouts;
  823. u32 upsd_max_sptime;
  824. u32 upsd_max_apturn;
  825. u32 pspoll_max_apturn;
  826. u32 pspoll_utilization;
  827. u32 upsd_utilization;
  828. } __packed;
  829. struct acx_rxpipe_statistics {
  830. u32 rx_prep_beacon_drop;
  831. u32 descr_host_int_trig_rx_data;
  832. u32 beacon_buffer_thres_host_int_trig_rx_data;
  833. u32 missed_beacon_host_int_trig_rx_data;
  834. u32 tx_xfr_host_int_trig_rx_data;
  835. } __packed;
  836. struct acx_statistics {
  837. struct acx_header header;
  838. struct acx_tx_statistics tx;
  839. struct acx_rx_statistics rx;
  840. struct acx_dma_statistics dma;
  841. struct acx_isr_statistics isr;
  842. struct acx_wep_statistics wep;
  843. struct acx_pwr_statistics pwr;
  844. struct acx_aes_statistics aes;
  845. struct acx_mic_statistics mic;
  846. struct acx_event_statistics event;
  847. struct acx_ps_statistics ps;
  848. struct acx_rxpipe_statistics rxpipe;
  849. } __packed;
  850. #define ACX_MAX_RATE_CLASSES 8
  851. #define ACX_RATE_MASK_UNSPECIFIED 0
  852. #define ACX_RATE_RETRY_LIMIT 10
  853. struct acx_rate_class {
  854. u32 enabled_rates;
  855. u8 short_retry_limit;
  856. u8 long_retry_limit;
  857. u8 aflags;
  858. u8 reserved;
  859. } __packed;
  860. struct acx_rate_policy {
  861. struct acx_header header;
  862. u32 rate_class_cnt;
  863. struct acx_rate_class rate_class[ACX_MAX_RATE_CLASSES];
  864. } __packed;
  865. struct wl1251_acx_memory {
  866. __le16 num_stations; /* number of STAs to be supported. */
  867. u16 reserved_1;
  868. /*
  869. * Nmber of memory buffers for the RX mem pool.
  870. * The actual number may be less if there are
  871. * not enough blocks left for the minimum num
  872. * of TX ones.
  873. */
  874. u8 rx_mem_block_num;
  875. u8 reserved_2;
  876. u8 num_tx_queues; /* From 1 to 16 */
  877. u8 host_if_options; /* HOST_IF* */
  878. u8 tx_min_mem_block_num;
  879. u8 num_ssid_profiles;
  880. __le16 debug_buffer_size;
  881. } __packed;
  882. #define ACX_RX_DESC_MIN 1
  883. #define ACX_RX_DESC_MAX 127
  884. #define ACX_RX_DESC_DEF 32
  885. struct wl1251_acx_rx_queue_config {
  886. u8 num_descs;
  887. u8 pad;
  888. u8 type;
  889. u8 priority;
  890. __le32 dma_address;
  891. } __packed;
  892. #define ACX_TX_DESC_MIN 1
  893. #define ACX_TX_DESC_MAX 127
  894. #define ACX_TX_DESC_DEF 16
  895. struct wl1251_acx_tx_queue_config {
  896. u8 num_descs;
  897. u8 pad[2];
  898. u8 attributes;
  899. } __packed;
  900. #define MAX_TX_QUEUE_CONFIGS 5
  901. #define MAX_TX_QUEUES 4
  902. struct wl1251_acx_config_memory {
  903. struct acx_header header;
  904. struct wl1251_acx_memory mem_config;
  905. struct wl1251_acx_rx_queue_config rx_queue_config;
  906. struct wl1251_acx_tx_queue_config tx_queue_config[MAX_TX_QUEUE_CONFIGS];
  907. } __packed;
  908. struct wl1251_acx_mem_map {
  909. struct acx_header header;
  910. void *code_start;
  911. void *code_end;
  912. void *wep_defkey_start;
  913. void *wep_defkey_end;
  914. void *sta_table_start;
  915. void *sta_table_end;
  916. void *packet_template_start;
  917. void *packet_template_end;
  918. void *queue_memory_start;
  919. void *queue_memory_end;
  920. void *packet_memory_pool_start;
  921. void *packet_memory_pool_end;
  922. void *debug_buffer1_start;
  923. void *debug_buffer1_end;
  924. void *debug_buffer2_start;
  925. void *debug_buffer2_end;
  926. /* Number of blocks FW allocated for TX packets */
  927. u32 num_tx_mem_blocks;
  928. /* Number of blocks FW allocated for RX packets */
  929. u32 num_rx_mem_blocks;
  930. } __packed;
  931. struct wl1251_acx_wr_tbtt_and_dtim {
  932. struct acx_header header;
  933. /* Time in TUs between two consecutive beacons */
  934. u16 tbtt;
  935. /*
  936. * DTIM period
  937. * For BSS: Number of TBTTs in a DTIM period (range: 1-10)
  938. * For IBSS: value shall be set to 1
  939. */
  940. u8 dtim;
  941. u8 padding;
  942. } __packed;
  943. struct wl1251_acx_ac_cfg {
  944. struct acx_header header;
  945. /*
  946. * Access Category - The TX queue's access category
  947. * (refer to AccessCategory_enum)
  948. */
  949. u8 ac;
  950. /*
  951. * The contention window minimum size (in slots) for
  952. * the access class.
  953. */
  954. u8 cw_min;
  955. /*
  956. * The contention window maximum size (in slots) for
  957. * the access class.
  958. */
  959. u16 cw_max;
  960. /* The AIF value (in slots) for the access class. */
  961. u8 aifsn;
  962. u8 reserved;
  963. /* The TX Op Limit (in microseconds) for the access class. */
  964. u16 txop_limit;
  965. } __packed;
  966. enum wl1251_acx_channel_type {
  967. CHANNEL_TYPE_DCF = 0,
  968. CHANNEL_TYPE_EDCF = 1,
  969. CHANNEL_TYPE_HCCA = 2,
  970. };
  971. enum wl1251_acx_ps_scheme {
  972. /* regular ps: simple sending of packets */
  973. WL1251_ACX_PS_SCHEME_LEGACY = 0,
  974. /* sending a packet triggers a unscheduled apsd downstream */
  975. WL1251_ACX_PS_SCHEME_UPSD_TRIGGER = 1,
  976. /* a pspoll packet will be sent before every data packet */
  977. WL1251_ACX_PS_SCHEME_LEGACY_PSPOLL = 2,
  978. /* scheduled apsd mode */
  979. WL1251_ACX_PS_SCHEME_SAPSD = 3,
  980. };
  981. enum wl1251_acx_ack_policy {
  982. WL1251_ACX_ACK_POLICY_LEGACY = 0,
  983. WL1251_ACX_ACK_POLICY_NO_ACK = 1,
  984. WL1251_ACX_ACK_POLICY_BLOCK = 2,
  985. };
  986. struct wl1251_acx_tid_cfg {
  987. struct acx_header header;
  988. /* tx queue id number (0-7) */
  989. u8 queue;
  990. /* channel access type for the queue, enum wl1251_acx_channel_type */
  991. u8 type;
  992. /* EDCA: ac index (0-3), HCCA: traffic stream id (8-15) */
  993. u8 tsid;
  994. /* ps scheme of the specified queue, enum wl1251_acx_ps_scheme */
  995. u8 ps_scheme;
  996. /* the tx queue ack policy, enum wl1251_acx_ack_policy */
  997. u8 ack_policy;
  998. u8 padding[3];
  999. /* not supported */
  1000. u32 apsdconf[2];
  1001. } __packed;
  1002. /*************************************************************************
  1003. Host Interrupt Register (WiLink -> Host)
  1004. **************************************************************************/
  1005. /* RX packet is ready in Xfer buffer #0 */
  1006. #define WL1251_ACX_INTR_RX0_DATA BIT(0)
  1007. /* TX result(s) are in the TX complete buffer */
  1008. #define WL1251_ACX_INTR_TX_RESULT BIT(1)
  1009. /* OBSOLETE */
  1010. #define WL1251_ACX_INTR_TX_XFR BIT(2)
  1011. /* RX packet is ready in Xfer buffer #1 */
  1012. #define WL1251_ACX_INTR_RX1_DATA BIT(3)
  1013. /* Event was entered to Event MBOX #A */
  1014. #define WL1251_ACX_INTR_EVENT_A BIT(4)
  1015. /* Event was entered to Event MBOX #B */
  1016. #define WL1251_ACX_INTR_EVENT_B BIT(5)
  1017. /* OBSOLETE */
  1018. #define WL1251_ACX_INTR_WAKE_ON_HOST BIT(6)
  1019. /* Trace meassge on MBOX #A */
  1020. #define WL1251_ACX_INTR_TRACE_A BIT(7)
  1021. /* Trace meassge on MBOX #B */
  1022. #define WL1251_ACX_INTR_TRACE_B BIT(8)
  1023. /* Command processing completion */
  1024. #define WL1251_ACX_INTR_CMD_COMPLETE BIT(9)
  1025. /* Init sequence is done */
  1026. #define WL1251_ACX_INTR_INIT_COMPLETE BIT(14)
  1027. #define WL1251_ACX_INTR_ALL 0xFFFFFFFF
  1028. enum {
  1029. ACX_WAKE_UP_CONDITIONS = 0x0002,
  1030. ACX_MEM_CFG = 0x0003,
  1031. ACX_SLOT = 0x0004,
  1032. ACX_QUEUE_HEAD = 0x0005, /* for MASTER mode only */
  1033. ACX_AC_CFG = 0x0007,
  1034. ACX_MEM_MAP = 0x0008,
  1035. ACX_AID = 0x000A,
  1036. ACX_RADIO_PARAM = 0x000B, /* Not used */
  1037. ACX_CFG = 0x000C, /* Not used */
  1038. ACX_FW_REV = 0x000D,
  1039. ACX_MEDIUM_USAGE = 0x000F,
  1040. ACX_RX_CFG = 0x0010,
  1041. ACX_TX_QUEUE_CFG = 0x0011, /* FIXME: only used by wl1251 */
  1042. ACX_BSS_IN_PS = 0x0012, /* for AP only */
  1043. ACX_STATISTICS = 0x0013, /* Debug API */
  1044. ACX_FEATURE_CFG = 0x0015,
  1045. ACX_MISC_CFG = 0x0017, /* Not used */
  1046. ACX_TID_CFG = 0x001A,
  1047. ACX_BEACON_FILTER_OPT = 0x001F,
  1048. ACX_LOW_RSSI = 0x0020,
  1049. ACX_NOISE_HIST = 0x0021,
  1050. ACX_HDK_VERSION = 0x0022, /* ??? */
  1051. ACX_PD_THRESHOLD = 0x0023,
  1052. ACX_DATA_PATH_PARAMS = 0x0024, /* WO */
  1053. ACX_DATA_PATH_RESP_PARAMS = 0x0024, /* RO */
  1054. ACX_CCA_THRESHOLD = 0x0025,
  1055. ACX_EVENT_MBOX_MASK = 0x0026,
  1056. #ifdef FW_RUNNING_AS_AP
  1057. ACX_DTIM_PERIOD = 0x0027, /* for AP only */
  1058. #else
  1059. ACX_WR_TBTT_AND_DTIM = 0x0027, /* STA only */
  1060. #endif
  1061. ACX_ACI_OPTION_CFG = 0x0029, /* OBSOLETE (for 1251)*/
  1062. ACX_GPIO_CFG = 0x002A, /* Not used */
  1063. ACX_GPIO_SET = 0x002B, /* Not used */
  1064. ACX_PM_CFG = 0x002C, /* To Be Documented */
  1065. ACX_CONN_MONIT_PARAMS = 0x002D,
  1066. ACX_AVERAGE_RSSI = 0x002E, /* Not used */
  1067. ACX_CONS_TX_FAILURE = 0x002F,
  1068. ACX_BCN_DTIM_OPTIONS = 0x0031,
  1069. ACX_SG_ENABLE = 0x0032,
  1070. ACX_SG_CFG = 0x0033,
  1071. ACX_ANTENNA_DIVERSITY_CFG = 0x0035, /* To Be Documented */
  1072. ACX_LOW_SNR = 0x0037, /* To Be Documented */
  1073. ACX_BEACON_FILTER_TABLE = 0x0038,
  1074. ACX_ARP_IP_FILTER = 0x0039,
  1075. ACX_ROAMING_STATISTICS_TBL = 0x003B,
  1076. ACX_RATE_POLICY = 0x003D,
  1077. ACX_CTS_PROTECTION = 0x003E,
  1078. ACX_SLEEP_AUTH = 0x003F,
  1079. ACX_PREAMBLE_TYPE = 0x0040,
  1080. ACX_ERROR_CNT = 0x0041,
  1081. ACX_FW_GEN_FRAME_RATES = 0x0042,
  1082. ACX_IBSS_FILTER = 0x0044,
  1083. ACX_SERVICE_PERIOD_TIMEOUT = 0x0045,
  1084. ACX_TSF_INFO = 0x0046,
  1085. ACX_CONFIG_PS_WMM = 0x0049,
  1086. ACX_ENABLE_RX_DATA_FILTER = 0x004A,
  1087. ACX_SET_RX_DATA_FILTER = 0x004B,
  1088. ACX_GET_DATA_FILTER_STATISTICS = 0x004C,
  1089. ACX_POWER_LEVEL_TABLE = 0x004D,
  1090. ACX_BET_ENABLE = 0x0050,
  1091. DOT11_STATION_ID = 0x1001,
  1092. DOT11_RX_MSDU_LIFE_TIME = 0x1004,
  1093. DOT11_CUR_TX_PWR = 0x100D,
  1094. DOT11_DEFAULT_KEY = 0x1010,
  1095. DOT11_RX_DOT11_MODE = 0x1012,
  1096. DOT11_RTS_THRESHOLD = 0x1013,
  1097. DOT11_GROUP_ADDRESS_TBL = 0x1014,
  1098. MAX_DOT11_IE = DOT11_GROUP_ADDRESS_TBL,
  1099. MAX_IE = 0xFFFF
  1100. };
  1101. int wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod,
  1102. u8 mgt_rate, u8 mgt_mod);
  1103. int wl1251_acx_station_id(struct wl1251 *wl);
  1104. int wl1251_acx_default_key(struct wl1251 *wl, u8 key_id);
  1105. int wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event,
  1106. u8 listen_interval);
  1107. int wl1251_acx_sleep_auth(struct wl1251 *wl, u8 sleep_auth);
  1108. int wl1251_acx_fw_version(struct wl1251 *wl, char *buf, size_t len);
  1109. int wl1251_acx_tx_power(struct wl1251 *wl, int power);
  1110. int wl1251_acx_feature_cfg(struct wl1251 *wl);
  1111. int wl1251_acx_mem_map(struct wl1251 *wl,
  1112. struct acx_header *mem_map, size_t len);
  1113. int wl1251_acx_data_path_params(struct wl1251 *wl,
  1114. struct acx_data_path_params_resp *data_path);
  1115. int wl1251_acx_rx_msdu_life_time(struct wl1251 *wl, u32 life_time);
  1116. int wl1251_acx_rx_config(struct wl1251 *wl, u32 config, u32 filter);
  1117. int wl1251_acx_pd_threshold(struct wl1251 *wl);
  1118. int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time);
  1119. int wl1251_acx_group_address_tbl(struct wl1251 *wl);
  1120. int wl1251_acx_service_period_timeout(struct wl1251 *wl);
  1121. int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold);
  1122. int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter);
  1123. int wl1251_acx_beacon_filter_table(struct wl1251 *wl);
  1124. int wl1251_acx_conn_monit_params(struct wl1251 *wl);
  1125. int wl1251_acx_sg_enable(struct wl1251 *wl);
  1126. int wl1251_acx_sg_cfg(struct wl1251 *wl);
  1127. int wl1251_acx_cca_threshold(struct wl1251 *wl);
  1128. int wl1251_acx_bcn_dtim_options(struct wl1251 *wl);
  1129. int wl1251_acx_aid(struct wl1251 *wl, u16 aid);
  1130. int wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask);
  1131. int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble);
  1132. int wl1251_acx_cts_protect(struct wl1251 *wl,
  1133. enum acx_ctsprotect_type ctsprotect);
  1134. int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats);
  1135. int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime);
  1136. int wl1251_acx_rate_policies(struct wl1251 *wl);
  1137. int wl1251_acx_mem_cfg(struct wl1251 *wl);
  1138. int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim);
  1139. int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max,
  1140. u8 aifs, u16 txop);
  1141. int wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue,
  1142. enum wl1251_acx_channel_type type,
  1143. u8 tsid, enum wl1251_acx_ps_scheme ps_scheme,
  1144. enum wl1251_acx_ack_policy ack_policy);
  1145. #endif /* __WL1251_ACX_H__ */