acx.h 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383
  1. /*
  2. * This file is part of wl1271
  3. *
  4. * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
  5. * Copyright (C) 2008-2010 Nokia Corporation
  6. *
  7. * Contact: Luciano Coelho <luciano.coelho@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 __ACX_H__
  25. #define __ACX_H__
  26. #include "wl12xx.h"
  27. #include "cmd.h"
  28. /*************************************************************************
  29. Host Interrupt Register (WiLink -> Host)
  30. **************************************************************************/
  31. /* HW Initiated interrupt Watchdog timer expiration */
  32. #define WL1271_ACX_INTR_WATCHDOG BIT(0)
  33. /* Init sequence is done (masked interrupt, detection through polling only ) */
  34. #define WL1271_ACX_INTR_INIT_COMPLETE BIT(1)
  35. /* Event was entered to Event MBOX #A*/
  36. #define WL1271_ACX_INTR_EVENT_A BIT(2)
  37. /* Event was entered to Event MBOX #B*/
  38. #define WL1271_ACX_INTR_EVENT_B BIT(3)
  39. /* Command processing completion*/
  40. #define WL1271_ACX_INTR_CMD_COMPLETE BIT(4)
  41. /* Signaling the host on HW wakeup */
  42. #define WL1271_ACX_INTR_HW_AVAILABLE BIT(5)
  43. /* The MISC bit is used for aggregation of RX, TxComplete and TX rate update */
  44. #define WL1271_ACX_INTR_DATA BIT(6)
  45. /* Trace message on MBOX #A */
  46. #define WL1271_ACX_INTR_TRACE_A BIT(7)
  47. /* Trace message on MBOX #B */
  48. #define WL1271_ACX_INTR_TRACE_B BIT(8)
  49. #define WL1271_ACX_INTR_ALL 0xFFFFFFFF
  50. #define WL1271_ACX_ALL_EVENTS_VECTOR (WL1271_ACX_INTR_WATCHDOG | \
  51. WL1271_ACX_INTR_INIT_COMPLETE | \
  52. WL1271_ACX_INTR_EVENT_A | \
  53. WL1271_ACX_INTR_EVENT_B | \
  54. WL1271_ACX_INTR_CMD_COMPLETE | \
  55. WL1271_ACX_INTR_HW_AVAILABLE | \
  56. WL1271_ACX_INTR_DATA)
  57. #define WL1271_INTR_MASK (WL1271_ACX_INTR_WATCHDOG | \
  58. WL1271_ACX_INTR_EVENT_A | \
  59. WL1271_ACX_INTR_EVENT_B | \
  60. WL1271_ACX_INTR_HW_AVAILABLE | \
  61. WL1271_ACX_INTR_DATA)
  62. /* Target's information element */
  63. struct acx_header {
  64. struct wl1271_cmd_header cmd;
  65. /* acx (or information element) header */
  66. __le16 id;
  67. /* payload length (not including headers */
  68. __le16 len;
  69. } __packed;
  70. struct acx_error_counter {
  71. struct acx_header header;
  72. /* The number of PLCP errors since the last time this */
  73. /* information element was interrogated. This field is */
  74. /* automatically cleared when it is interrogated.*/
  75. __le32 PLCP_error;
  76. /* The number of FCS errors since the last time this */
  77. /* information element was interrogated. This field is */
  78. /* automatically cleared when it is interrogated.*/
  79. __le32 FCS_error;
  80. /* The number of MPDUs without PLCP header errors received*/
  81. /* since the last time this information element was interrogated. */
  82. /* This field is automatically cleared when it is interrogated.*/
  83. __le32 valid_frame;
  84. /* the number of missed sequence numbers in the squentially */
  85. /* values of frames seq numbers */
  86. __le32 seq_num_miss;
  87. } __packed;
  88. enum wl1271_psm_mode {
  89. /* Active mode */
  90. WL1271_PSM_CAM = 0,
  91. /* Power save mode */
  92. WL1271_PSM_PS = 1,
  93. /* Extreme low power */
  94. WL1271_PSM_ELP = 2,
  95. };
  96. struct acx_sleep_auth {
  97. struct acx_header header;
  98. /* The sleep level authorization of the device. */
  99. /* 0 - Always active*/
  100. /* 1 - Power down mode: light / fast sleep*/
  101. /* 2 - ELP mode: Deep / Max sleep*/
  102. u8 sleep_auth;
  103. u8 padding[3];
  104. } __packed;
  105. enum {
  106. HOSTIF_PCI_MASTER_HOST_INDIRECT,
  107. HOSTIF_PCI_MASTER_HOST_DIRECT,
  108. HOSTIF_SLAVE,
  109. HOSTIF_PKT_RING,
  110. HOSTIF_DONTCARE = 0xFF
  111. };
  112. #define DEFAULT_UCAST_PRIORITY 0
  113. #define DEFAULT_RX_Q_PRIORITY 0
  114. #define DEFAULT_RXQ_PRIORITY 0 /* low 0 .. 15 high */
  115. #define DEFAULT_RXQ_TYPE 0x07 /* All frames, Data/Ctrl/Mgmt */
  116. #define TRACE_BUFFER_MAX_SIZE 256
  117. #define DP_RX_PACKET_RING_CHUNK_SIZE 1600
  118. #define DP_TX_PACKET_RING_CHUNK_SIZE 1600
  119. #define DP_RX_PACKET_RING_CHUNK_NUM 2
  120. #define DP_TX_PACKET_RING_CHUNK_NUM 2
  121. #define DP_TX_COMPLETE_TIME_OUT 20
  122. #define TX_MSDU_LIFETIME_MIN 0
  123. #define TX_MSDU_LIFETIME_MAX 3000
  124. #define TX_MSDU_LIFETIME_DEF 512
  125. #define RX_MSDU_LIFETIME_MIN 0
  126. #define RX_MSDU_LIFETIME_MAX 0xFFFFFFFF
  127. #define RX_MSDU_LIFETIME_DEF 512000
  128. struct acx_rx_msdu_lifetime {
  129. struct acx_header header;
  130. /*
  131. * The maximum amount of time, in TU, before the
  132. * firmware discards the MSDU.
  133. */
  134. __le32 lifetime;
  135. } __packed;
  136. /*
  137. * RX Config Options Table
  138. * Bit Definition
  139. * === ==========
  140. * 31:14 Reserved
  141. * 13 Copy RX Status - when set, write three receive status words
  142. * to top of rx'd MPDUs.
  143. * When cleared, do not write three status words (added rev 1.5)
  144. * 12 Reserved
  145. * 11 RX Complete upon FCS error - when set, give rx complete
  146. * interrupt for FCS errors, after the rx filtering, e.g. unicast
  147. * frames not to us with FCS error will not generate an interrupt.
  148. * 10 SSID Filter Enable - When set, the WiLink discards all beacon,
  149. * probe request, and probe response frames with an SSID that does
  150. * not match the SSID specified by the host in the START/JOIN
  151. * command.
  152. * When clear, the WiLink receives frames with any SSID.
  153. * 9 Broadcast Filter Enable - When set, the WiLink discards all
  154. * broadcast frames. When clear, the WiLink receives all received
  155. * broadcast frames.
  156. * 8:6 Reserved
  157. * 5 BSSID Filter Enable - When set, the WiLink discards any frames
  158. * with a BSSID that does not match the BSSID specified by the
  159. * host.
  160. * When clear, the WiLink receives frames from any BSSID.
  161. * 4 MAC Addr Filter - When set, the WiLink discards any frames
  162. * with a destination address that does not match the MAC address
  163. * of the adaptor.
  164. * When clear, the WiLink receives frames destined to any MAC
  165. * address.
  166. * 3 Promiscuous - When set, the WiLink receives all valid frames
  167. * (i.e., all frames that pass the FCS check).
  168. * When clear, only frames that pass the other filters specified
  169. * are received.
  170. * 2 FCS - When set, the WiLink includes the FCS with the received
  171. * frame.
  172. * When cleared, the FCS is discarded.
  173. * 1 PLCP header - When set, write all data from baseband to frame
  174. * buffer including PHY header.
  175. * 0 Reserved - Always equal to 0.
  176. *
  177. * RX Filter Options Table
  178. * Bit Definition
  179. * === ==========
  180. * 31:12 Reserved - Always equal to 0.
  181. * 11 Association - When set, the WiLink receives all association
  182. * related frames (association request/response, reassocation
  183. * request/response, and disassociation). When clear, these frames
  184. * are discarded.
  185. * 10 Auth/De auth - When set, the WiLink receives all authentication
  186. * and de-authentication frames. When clear, these frames are
  187. * discarded.
  188. * 9 Beacon - When set, the WiLink receives all beacon frames.
  189. * When clear, these frames are discarded.
  190. * 8 Contention Free - When set, the WiLink receives all contention
  191. * free frames.
  192. * When clear, these frames are discarded.
  193. * 7 Control - When set, the WiLink receives all control frames.
  194. * When clear, these frames are discarded.
  195. * 6 Data - When set, the WiLink receives all data frames.
  196. * When clear, these frames are discarded.
  197. * 5 FCS Error - When set, the WiLink receives frames that have FCS
  198. * errors.
  199. * When clear, these frames are discarded.
  200. * 4 Management - When set, the WiLink receives all management
  201. * frames.
  202. * When clear, these frames are discarded.
  203. * 3 Probe Request - When set, the WiLink receives all probe request
  204. * frames.
  205. * When clear, these frames are discarded.
  206. * 2 Probe Response - When set, the WiLink receives all probe
  207. * response frames.
  208. * When clear, these frames are discarded.
  209. * 1 RTS/CTS/ACK - When set, the WiLink receives all RTS, CTS and ACK
  210. * frames.
  211. * When clear, these frames are discarded.
  212. * 0 Rsvd Type/Sub Type - When set, the WiLink receives all frames
  213. * that have reserved frame types and sub types as defined by the
  214. * 802.11 specification.
  215. * When clear, these frames are discarded.
  216. */
  217. struct acx_rx_config {
  218. struct acx_header header;
  219. __le32 config_options;
  220. __le32 filter_options;
  221. } __packed;
  222. struct acx_packet_detection {
  223. struct acx_header header;
  224. __le32 threshold;
  225. } __packed;
  226. enum acx_slot_type {
  227. SLOT_TIME_LONG = 0,
  228. SLOT_TIME_SHORT = 1,
  229. DEFAULT_SLOT_TIME = SLOT_TIME_SHORT,
  230. MAX_SLOT_TIMES = 0xFF
  231. };
  232. #define STATION_WONE_INDEX 0
  233. struct acx_slot {
  234. struct acx_header header;
  235. u8 wone_index; /* Reserved */
  236. u8 slot_time;
  237. u8 reserved[6];
  238. } __packed;
  239. #define ACX_MC_ADDRESS_GROUP_MAX (8)
  240. #define ADDRESS_GROUP_MAX_LEN (ETH_ALEN * ACX_MC_ADDRESS_GROUP_MAX)
  241. struct acx_dot11_grp_addr_tbl {
  242. struct acx_header header;
  243. u8 enabled;
  244. u8 num_groups;
  245. u8 pad[2];
  246. u8 mac_table[ADDRESS_GROUP_MAX_LEN];
  247. } __packed;
  248. struct acx_rx_timeout {
  249. struct acx_header header;
  250. __le16 ps_poll_timeout;
  251. __le16 upsd_timeout;
  252. } __packed;
  253. struct acx_rts_threshold {
  254. struct acx_header header;
  255. __le16 threshold;
  256. u8 pad[2];
  257. } __packed;
  258. struct acx_beacon_filter_option {
  259. struct acx_header header;
  260. u8 enable;
  261. /*
  262. * The number of beacons without the unicast TIM
  263. * bit set that the firmware buffers before
  264. * signaling the host about ready frames.
  265. * When set to 0 and the filter is enabled, beacons
  266. * without the unicast TIM bit set are dropped.
  267. */
  268. u8 max_num_beacons;
  269. u8 pad[2];
  270. } __packed;
  271. /*
  272. * ACXBeaconFilterEntry (not 221)
  273. * Byte Offset Size (Bytes) Definition
  274. * =========== ============ ==========
  275. * 0 1 IE identifier
  276. * 1 1 Treatment bit mask
  277. *
  278. * ACXBeaconFilterEntry (221)
  279. * Byte Offset Size (Bytes) Definition
  280. * =========== ============ ==========
  281. * 0 1 IE identifier
  282. * 1 1 Treatment bit mask
  283. * 2 3 OUI
  284. * 5 1 Type
  285. * 6 2 Version
  286. *
  287. *
  288. * Treatment bit mask - The information element handling:
  289. * bit 0 - The information element is compared and transferred
  290. * in case of change.
  291. * bit 1 - The information element is transferred to the host
  292. * with each appearance or disappearance.
  293. * Note that both bits can be set at the same time.
  294. */
  295. #define BEACON_FILTER_TABLE_MAX_IE_NUM (32)
  296. #define BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM (6)
  297. #define BEACON_FILTER_TABLE_IE_ENTRY_SIZE (2)
  298. #define BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE (6)
  299. #define BEACON_FILTER_TABLE_MAX_SIZE ((BEACON_FILTER_TABLE_MAX_IE_NUM * \
  300. BEACON_FILTER_TABLE_IE_ENTRY_SIZE) + \
  301. (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
  302. BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
  303. struct acx_beacon_filter_ie_table {
  304. struct acx_header header;
  305. u8 num_ie;
  306. u8 pad[3];
  307. u8 table[BEACON_FILTER_TABLE_MAX_SIZE];
  308. } __packed;
  309. struct acx_conn_monit_params {
  310. struct acx_header header;
  311. __le32 synch_fail_thold; /* number of beacons missed */
  312. __le32 bss_lose_timeout; /* number of TU's from synch fail */
  313. } __packed;
  314. struct acx_bt_wlan_coex {
  315. struct acx_header header;
  316. u8 enable;
  317. u8 pad[3];
  318. } __packed;
  319. struct acx_bt_wlan_coex_param {
  320. struct acx_header header;
  321. __le32 params[CONF_SG_PARAMS_MAX];
  322. u8 param_idx;
  323. u8 padding[3];
  324. } __packed;
  325. struct acx_dco_itrim_params {
  326. struct acx_header header;
  327. u8 enable;
  328. u8 padding[3];
  329. __le32 timeout;
  330. } __packed;
  331. struct acx_energy_detection {
  332. struct acx_header header;
  333. /* The RX Clear Channel Assessment threshold in the PHY */
  334. __le16 rx_cca_threshold;
  335. u8 tx_energy_detection;
  336. u8 pad;
  337. } __packed;
  338. struct acx_beacon_broadcast {
  339. struct acx_header header;
  340. __le16 beacon_rx_timeout;
  341. __le16 broadcast_timeout;
  342. /* Enables receiving of broadcast packets in PS mode */
  343. u8 rx_broadcast_in_ps;
  344. /* Consecutive PS Poll failures before updating the host */
  345. u8 ps_poll_threshold;
  346. u8 pad[2];
  347. } __packed;
  348. struct acx_event_mask {
  349. struct acx_header header;
  350. __le32 event_mask;
  351. __le32 high_event_mask; /* Unused */
  352. } __packed;
  353. #define CFG_RX_FCS BIT(2)
  354. #define CFG_RX_ALL_GOOD BIT(3)
  355. #define CFG_UNI_FILTER_EN BIT(4)
  356. #define CFG_BSSID_FILTER_EN BIT(5)
  357. #define CFG_MC_FILTER_EN BIT(6)
  358. #define CFG_MC_ADDR0_EN BIT(7)
  359. #define CFG_MC_ADDR1_EN BIT(8)
  360. #define CFG_BC_REJECT_EN BIT(9)
  361. #define CFG_SSID_FILTER_EN BIT(10)
  362. #define CFG_RX_INT_FCS_ERROR BIT(11)
  363. #define CFG_RX_INT_ENCRYPTED BIT(12)
  364. #define CFG_RX_WR_RX_STATUS BIT(13)
  365. #define CFG_RX_FILTER_NULTI BIT(14)
  366. #define CFG_RX_RESERVE BIT(15)
  367. #define CFG_RX_TIMESTAMP_TSF BIT(16)
  368. #define CFG_RX_RSV_EN BIT(0)
  369. #define CFG_RX_RCTS_ACK BIT(1)
  370. #define CFG_RX_PRSP_EN BIT(2)
  371. #define CFG_RX_PREQ_EN BIT(3)
  372. #define CFG_RX_MGMT_EN BIT(4)
  373. #define CFG_RX_FCS_ERROR BIT(5)
  374. #define CFG_RX_DATA_EN BIT(6)
  375. #define CFG_RX_CTL_EN BIT(7)
  376. #define CFG_RX_CF_EN BIT(8)
  377. #define CFG_RX_BCN_EN BIT(9)
  378. #define CFG_RX_AUTH_EN BIT(10)
  379. #define CFG_RX_ASSOC_EN BIT(11)
  380. #define SCAN_PASSIVE BIT(0)
  381. #define SCAN_5GHZ_BAND BIT(1)
  382. #define SCAN_TRIGGERED BIT(2)
  383. #define SCAN_PRIORITY_HIGH BIT(3)
  384. /* When set, disable HW encryption */
  385. #define DF_ENCRYPTION_DISABLE 0x01
  386. #define DF_SNIFF_MODE_ENABLE 0x80
  387. struct acx_feature_config {
  388. struct acx_header header;
  389. __le32 options;
  390. __le32 data_flow_options;
  391. } __packed;
  392. struct acx_current_tx_power {
  393. struct acx_header header;
  394. u8 current_tx_power;
  395. u8 padding[3];
  396. } __packed;
  397. struct acx_wake_up_condition {
  398. struct acx_header header;
  399. u8 wake_up_event; /* Only one bit can be set */
  400. u8 listen_interval;
  401. u8 pad[2];
  402. } __packed;
  403. struct acx_aid {
  404. struct acx_header header;
  405. /*
  406. * To be set when associated with an AP.
  407. */
  408. __le16 aid;
  409. u8 pad[2];
  410. } __packed;
  411. enum acx_preamble_type {
  412. ACX_PREAMBLE_LONG = 0,
  413. ACX_PREAMBLE_SHORT = 1
  414. };
  415. struct acx_preamble {
  416. struct acx_header header;
  417. /*
  418. * When set, the WiLink transmits the frames with a short preamble and
  419. * when cleared, the WiLink transmits the frames with a long preamble.
  420. */
  421. u8 preamble;
  422. u8 padding[3];
  423. } __packed;
  424. enum acx_ctsprotect_type {
  425. CTSPROTECT_DISABLE = 0,
  426. CTSPROTECT_ENABLE = 1
  427. };
  428. struct acx_ctsprotect {
  429. struct acx_header header;
  430. u8 ctsprotect;
  431. u8 padding[3];
  432. } __packed;
  433. struct acx_tx_statistics {
  434. __le32 internal_desc_overflow;
  435. } __packed;
  436. struct acx_rx_statistics {
  437. __le32 out_of_mem;
  438. __le32 hdr_overflow;
  439. __le32 hw_stuck;
  440. __le32 dropped;
  441. __le32 fcs_err;
  442. __le32 xfr_hint_trig;
  443. __le32 path_reset;
  444. __le32 reset_counter;
  445. } __packed;
  446. struct acx_dma_statistics {
  447. __le32 rx_requested;
  448. __le32 rx_errors;
  449. __le32 tx_requested;
  450. __le32 tx_errors;
  451. } __packed;
  452. struct acx_isr_statistics {
  453. /* host command complete */
  454. __le32 cmd_cmplt;
  455. /* fiqisr() */
  456. __le32 fiqs;
  457. /* (INT_STS_ND & INT_TRIG_RX_HEADER) */
  458. __le32 rx_headers;
  459. /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */
  460. __le32 rx_completes;
  461. /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */
  462. __le32 rx_mem_overflow;
  463. /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */
  464. __le32 rx_rdys;
  465. /* irqisr() */
  466. __le32 irqs;
  467. /* (INT_STS_ND & INT_TRIG_TX_PROC) */
  468. __le32 tx_procs;
  469. /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */
  470. __le32 decrypt_done;
  471. /* (INT_STS_ND & INT_TRIG_DMA0) */
  472. __le32 dma0_done;
  473. /* (INT_STS_ND & INT_TRIG_DMA1) */
  474. __le32 dma1_done;
  475. /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */
  476. __le32 tx_exch_complete;
  477. /* (INT_STS_ND & INT_TRIG_COMMAND) */
  478. __le32 commands;
  479. /* (INT_STS_ND & INT_TRIG_RX_PROC) */
  480. __le32 rx_procs;
  481. /* (INT_STS_ND & INT_TRIG_PM_802) */
  482. __le32 hw_pm_mode_changes;
  483. /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */
  484. __le32 host_acknowledges;
  485. /* (INT_STS_ND & INT_TRIG_PM_PCI) */
  486. __le32 pci_pm;
  487. /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */
  488. __le32 wakeups;
  489. /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */
  490. __le32 low_rssi;
  491. } __packed;
  492. struct acx_wep_statistics {
  493. /* WEP address keys configured */
  494. __le32 addr_key_count;
  495. /* default keys configured */
  496. __le32 default_key_count;
  497. __le32 reserved;
  498. /* number of times that WEP key not found on lookup */
  499. __le32 key_not_found;
  500. /* number of times that WEP key decryption failed */
  501. __le32 decrypt_fail;
  502. /* WEP packets decrypted */
  503. __le32 packets;
  504. /* WEP decrypt interrupts */
  505. __le32 interrupt;
  506. } __packed;
  507. #define ACX_MISSED_BEACONS_SPREAD 10
  508. struct acx_pwr_statistics {
  509. /* the amount of enters into power save mode (both PD & ELP) */
  510. __le32 ps_enter;
  511. /* the amount of enters into ELP mode */
  512. __le32 elp_enter;
  513. /* the amount of missing beacon interrupts to the host */
  514. __le32 missing_bcns;
  515. /* the amount of wake on host-access times */
  516. __le32 wake_on_host;
  517. /* the amount of wake on timer-expire */
  518. __le32 wake_on_timer_exp;
  519. /* the number of packets that were transmitted with PS bit set */
  520. __le32 tx_with_ps;
  521. /* the number of packets that were transmitted with PS bit clear */
  522. __le32 tx_without_ps;
  523. /* the number of received beacons */
  524. __le32 rcvd_beacons;
  525. /* the number of entering into PowerOn (power save off) */
  526. __le32 power_save_off;
  527. /* the number of entries into power save mode */
  528. __le16 enable_ps;
  529. /*
  530. * the number of exits from power save, not including failed PS
  531. * transitions
  532. */
  533. __le16 disable_ps;
  534. /*
  535. * the number of times the TSF counter was adjusted because
  536. * of drift
  537. */
  538. __le32 fix_tsf_ps;
  539. /* Gives statistics about the spread continuous missed beacons.
  540. * The 16 LSB are dedicated for the PS mode.
  541. * The 16 MSB are dedicated for the PS mode.
  542. * cont_miss_bcns_spread[0] - single missed beacon.
  543. * cont_miss_bcns_spread[1] - two continuous missed beacons.
  544. * cont_miss_bcns_spread[2] - three continuous missed beacons.
  545. * ...
  546. * cont_miss_bcns_spread[9] - ten and more continuous missed beacons.
  547. */
  548. __le32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD];
  549. /* the number of beacons in awake mode */
  550. __le32 rcvd_awake_beacons;
  551. } __packed;
  552. struct acx_mic_statistics {
  553. __le32 rx_pkts;
  554. __le32 calc_failure;
  555. } __packed;
  556. struct acx_aes_statistics {
  557. __le32 encrypt_fail;
  558. __le32 decrypt_fail;
  559. __le32 encrypt_packets;
  560. __le32 decrypt_packets;
  561. __le32 encrypt_interrupt;
  562. __le32 decrypt_interrupt;
  563. } __packed;
  564. struct acx_event_statistics {
  565. __le32 heart_beat;
  566. __le32 calibration;
  567. __le32 rx_mismatch;
  568. __le32 rx_mem_empty;
  569. __le32 rx_pool;
  570. __le32 oom_late;
  571. __le32 phy_transmit_error;
  572. __le32 tx_stuck;
  573. } __packed;
  574. struct acx_ps_statistics {
  575. __le32 pspoll_timeouts;
  576. __le32 upsd_timeouts;
  577. __le32 upsd_max_sptime;
  578. __le32 upsd_max_apturn;
  579. __le32 pspoll_max_apturn;
  580. __le32 pspoll_utilization;
  581. __le32 upsd_utilization;
  582. } __packed;
  583. struct acx_rxpipe_statistics {
  584. __le32 rx_prep_beacon_drop;
  585. __le32 descr_host_int_trig_rx_data;
  586. __le32 beacon_buffer_thres_host_int_trig_rx_data;
  587. __le32 missed_beacon_host_int_trig_rx_data;
  588. __le32 tx_xfr_host_int_trig_rx_data;
  589. } __packed;
  590. struct acx_statistics {
  591. struct acx_header header;
  592. struct acx_tx_statistics tx;
  593. struct acx_rx_statistics rx;
  594. struct acx_dma_statistics dma;
  595. struct acx_isr_statistics isr;
  596. struct acx_wep_statistics wep;
  597. struct acx_pwr_statistics pwr;
  598. struct acx_aes_statistics aes;
  599. struct acx_mic_statistics mic;
  600. struct acx_event_statistics event;
  601. struct acx_ps_statistics ps;
  602. struct acx_rxpipe_statistics rxpipe;
  603. } __packed;
  604. struct acx_rate_class {
  605. __le32 enabled_rates;
  606. u8 short_retry_limit;
  607. u8 long_retry_limit;
  608. u8 aflags;
  609. u8 reserved;
  610. };
  611. #define ACX_TX_BASIC_RATE 0
  612. #define ACX_TX_AP_FULL_RATE 1
  613. #define ACX_TX_RATE_POLICY_CNT 2
  614. struct acx_sta_rate_policy {
  615. struct acx_header header;
  616. __le32 rate_class_cnt;
  617. struct acx_rate_class rate_class[CONF_TX_MAX_RATE_CLASSES];
  618. } __packed;
  619. #define ACX_TX_AP_MODE_MGMT_RATE 4
  620. #define ACX_TX_AP_MODE_BCST_RATE 5
  621. struct acx_ap_rate_policy {
  622. struct acx_header header;
  623. __le32 rate_policy_idx;
  624. struct acx_rate_class rate_policy;
  625. } __packed;
  626. struct acx_ac_cfg {
  627. struct acx_header header;
  628. u8 ac;
  629. u8 cw_min;
  630. __le16 cw_max;
  631. u8 aifsn;
  632. u8 reserved;
  633. __le16 tx_op_limit;
  634. } __packed;
  635. struct acx_tid_config {
  636. struct acx_header header;
  637. u8 queue_id;
  638. u8 channel_type;
  639. u8 tsid;
  640. u8 ps_scheme;
  641. u8 ack_policy;
  642. u8 padding[3];
  643. __le32 apsd_conf[2];
  644. } __packed;
  645. struct acx_frag_threshold {
  646. struct acx_header header;
  647. __le16 frag_threshold;
  648. u8 padding[2];
  649. } __packed;
  650. struct acx_tx_config_options {
  651. struct acx_header header;
  652. __le16 tx_compl_timeout; /* msec */
  653. __le16 tx_compl_threshold; /* number of packets */
  654. } __packed;
  655. #define ACX_TX_DESCRIPTORS 32
  656. struct wl1271_acx_ap_config_memory {
  657. struct acx_header header;
  658. u8 rx_mem_block_num;
  659. u8 tx_min_mem_block_num;
  660. u8 num_stations;
  661. u8 num_ssid_profiles;
  662. __le32 total_tx_descriptors;
  663. } __packed;
  664. struct wl1271_acx_sta_config_memory {
  665. struct acx_header header;
  666. u8 rx_mem_block_num;
  667. u8 tx_min_mem_block_num;
  668. u8 num_stations;
  669. u8 num_ssid_profiles;
  670. __le32 total_tx_descriptors;
  671. u8 dyn_mem_enable;
  672. u8 tx_free_req;
  673. u8 rx_free_req;
  674. u8 tx_min;
  675. } __packed;
  676. struct wl1271_acx_mem_map {
  677. struct acx_header header;
  678. __le32 code_start;
  679. __le32 code_end;
  680. __le32 wep_defkey_start;
  681. __le32 wep_defkey_end;
  682. __le32 sta_table_start;
  683. __le32 sta_table_end;
  684. __le32 packet_template_start;
  685. __le32 packet_template_end;
  686. /* Address of the TX result interface (control block) */
  687. __le32 tx_result;
  688. __le32 tx_result_queue_start;
  689. __le32 queue_memory_start;
  690. __le32 queue_memory_end;
  691. __le32 packet_memory_pool_start;
  692. __le32 packet_memory_pool_end;
  693. __le32 debug_buffer1_start;
  694. __le32 debug_buffer1_end;
  695. __le32 debug_buffer2_start;
  696. __le32 debug_buffer2_end;
  697. /* Number of blocks FW allocated for TX packets */
  698. __le32 num_tx_mem_blocks;
  699. /* Number of blocks FW allocated for RX packets */
  700. __le32 num_rx_mem_blocks;
  701. /* the following 4 fields are valid in SLAVE mode only */
  702. u8 *tx_cbuf;
  703. u8 *rx_cbuf;
  704. __le32 rx_ctrl;
  705. __le32 tx_ctrl;
  706. } __packed;
  707. struct wl1271_acx_rx_config_opt {
  708. struct acx_header header;
  709. __le16 mblk_threshold;
  710. __le16 threshold;
  711. __le16 timeout;
  712. u8 queue_type;
  713. u8 reserved;
  714. } __packed;
  715. struct wl1271_acx_bet_enable {
  716. struct acx_header header;
  717. u8 enable;
  718. u8 max_consecutive;
  719. u8 padding[2];
  720. } __packed;
  721. #define ACX_IPV4_VERSION 4
  722. #define ACX_IPV6_VERSION 6
  723. #define ACX_IPV4_ADDR_SIZE 4
  724. /* bitmap of enabled arp_filter features */
  725. #define ACX_ARP_FILTER_ARP_FILTERING BIT(0)
  726. #define ACX_ARP_FILTER_AUTO_ARP BIT(1)
  727. struct wl1271_acx_arp_filter {
  728. struct acx_header header;
  729. u8 version; /* ACX_IPV4_VERSION, ACX_IPV6_VERSION */
  730. u8 enable; /* bitmap of enabled ARP filtering features */
  731. u8 padding[2];
  732. u8 address[16]; /* The configured device IP address - all ARP
  733. requests directed to this IP address will pass
  734. through. For IPv4, the first four bytes are
  735. used. */
  736. } __packed;
  737. struct wl1271_acx_pm_config {
  738. struct acx_header header;
  739. __le32 host_clk_settling_time;
  740. u8 host_fast_wakeup_support;
  741. u8 padding[3];
  742. } __packed;
  743. struct wl1271_acx_keep_alive_mode {
  744. struct acx_header header;
  745. u8 enabled;
  746. u8 padding[3];
  747. } __packed;
  748. enum {
  749. ACX_KEEP_ALIVE_NO_TX = 0,
  750. ACX_KEEP_ALIVE_PERIOD_ONLY
  751. };
  752. enum {
  753. ACX_KEEP_ALIVE_TPL_INVALID = 0,
  754. ACX_KEEP_ALIVE_TPL_VALID
  755. };
  756. struct wl1271_acx_keep_alive_config {
  757. struct acx_header header;
  758. __le32 period;
  759. u8 index;
  760. u8 tpl_validation;
  761. u8 trigger;
  762. u8 padding;
  763. } __packed;
  764. #define HOST_IF_CFG_RX_FIFO_ENABLE BIT(0)
  765. #define HOST_IF_CFG_TX_EXTRA_BLKS_SWAP BIT(1)
  766. #define HOST_IF_CFG_TX_PAD_TO_SDIO_BLK BIT(3)
  767. struct wl1271_acx_host_config_bitmap {
  768. struct acx_header header;
  769. __le32 host_cfg_bitmap;
  770. } __packed;
  771. enum {
  772. WL1271_ACX_TRIG_TYPE_LEVEL = 0,
  773. WL1271_ACX_TRIG_TYPE_EDGE,
  774. };
  775. enum {
  776. WL1271_ACX_TRIG_DIR_LOW = 0,
  777. WL1271_ACX_TRIG_DIR_HIGH,
  778. WL1271_ACX_TRIG_DIR_BIDIR,
  779. };
  780. enum {
  781. WL1271_ACX_TRIG_ENABLE = 1,
  782. WL1271_ACX_TRIG_DISABLE,
  783. };
  784. enum {
  785. WL1271_ACX_TRIG_METRIC_RSSI_BEACON = 0,
  786. WL1271_ACX_TRIG_METRIC_RSSI_DATA,
  787. WL1271_ACX_TRIG_METRIC_SNR_BEACON,
  788. WL1271_ACX_TRIG_METRIC_SNR_DATA,
  789. };
  790. enum {
  791. WL1271_ACX_TRIG_IDX_RSSI = 0,
  792. WL1271_ACX_TRIG_COUNT = 8,
  793. };
  794. struct wl1271_acx_rssi_snr_trigger {
  795. struct acx_header header;
  796. __le16 threshold;
  797. __le16 pacing; /* 0 - 60000 ms */
  798. u8 metric;
  799. u8 type;
  800. u8 dir;
  801. u8 hysteresis;
  802. u8 index;
  803. u8 enable;
  804. u8 padding[2];
  805. };
  806. struct wl1271_acx_rssi_snr_avg_weights {
  807. struct acx_header header;
  808. u8 rssi_beacon;
  809. u8 rssi_data;
  810. u8 snr_beacon;
  811. u8 snr_data;
  812. };
  813. /*
  814. * ACX_PEER_HT_CAP
  815. * Configure HT capabilities - declare the capabilities of the peer
  816. * we are connected to.
  817. */
  818. struct wl1271_acx_ht_capabilities {
  819. struct acx_header header;
  820. /*
  821. * bit 0 - Allow HT Operation
  822. * bit 1 - Allow Greenfield format in TX
  823. * bit 2 - Allow Short GI in TX
  824. * bit 3 - Allow L-SIG TXOP Protection in TX
  825. * bit 4 - Allow HT Control fields in TX.
  826. * Note, driver will still leave space for HT control in packets
  827. * regardless of the value of this field. FW will be responsible
  828. * to drop the HT field from any frame when this Bit set to 0.
  829. * bit 5 - Allow RD initiation in TXOP. FW is allowed to initate RD.
  830. * Exact policy setting for this feature is TBD.
  831. * Note, this bit can only be set to 1 if bit 3 is set to 1.
  832. */
  833. __le32 ht_capabilites;
  834. /*
  835. * Indicates to which peer these capabilities apply.
  836. * For infrastructure use ff:ff:ff:ff:ff:ff that indicates relevance
  837. * for all peers.
  838. * Only valid for IBSS/DLS operation.
  839. */
  840. u8 mac_address[ETH_ALEN];
  841. /*
  842. * This the maximum A-MPDU length supported by the AP. The FW may not
  843. * exceed this length when sending A-MPDUs
  844. */
  845. u8 ampdu_max_length;
  846. /* This is the minimal spacing required when sending A-MPDUs to the AP*/
  847. u8 ampdu_min_spacing;
  848. } __packed;
  849. /* HT Capabilites Fw Bit Mask Mapping */
  850. #define WL1271_ACX_FW_CAP_HT_OPERATION BIT(0)
  851. #define WL1271_ACX_FW_CAP_GREENFIELD_FRAME_FORMAT BIT(1)
  852. #define WL1271_ACX_FW_CAP_SHORT_GI_FOR_20MHZ_PACKETS BIT(2)
  853. #define WL1271_ACX_FW_CAP_LSIG_TXOP_PROTECTION BIT(3)
  854. #define WL1271_ACX_FW_CAP_HT_CONTROL_FIELDS BIT(4)
  855. #define WL1271_ACX_FW_CAP_RD_INITIATION BIT(5)
  856. /*
  857. * ACX_HT_BSS_OPERATION
  858. * Configure HT capabilities - AP rules for behavior in the BSS.
  859. */
  860. struct wl1271_acx_ht_information {
  861. struct acx_header header;
  862. /* Values: 0 - RIFS not allowed, 1 - RIFS allowed */
  863. u8 rifs_mode;
  864. /* Values: 0 - 3 like in spec */
  865. u8 ht_protection;
  866. /* Values: 0 - GF protection not required, 1 - GF protection required */
  867. u8 gf_protection;
  868. /*Values: 0 - TX Burst limit not required, 1 - TX Burst Limit required*/
  869. u8 ht_tx_burst_limit;
  870. /*
  871. * Values: 0 - Dual CTS protection not required,
  872. * 1 - Dual CTS Protection required
  873. * Note: When this value is set to 1 FW will protect all TXOP with RTS
  874. * frame and will not use CTS-to-self regardless of the value of the
  875. * ACX_CTS_PROTECTION information element
  876. */
  877. u8 dual_cts_protection;
  878. u8 padding[3];
  879. } __packed;
  880. #define RX_BA_WIN_SIZE 8
  881. struct wl1271_acx_ba_session_policy {
  882. struct acx_header header;
  883. /*
  884. * Specifies role Id, Range 0-7, 0xFF means ANY role.
  885. * Future use. For now this field is irrelevant
  886. */
  887. u8 role_id;
  888. /*
  889. * Specifies Link Id, Range 0-31, 0xFF means ANY Link Id.
  890. * Not applicable if Role Id is set to ANY.
  891. */
  892. u8 link_id;
  893. u8 tid;
  894. u8 enable;
  895. /* Windows size in number of packets */
  896. u16 win_size;
  897. /*
  898. * As initiator inactivity timeout in time units(TU) of 1024us.
  899. * As receiver reserved
  900. */
  901. u16 inactivity_timeout;
  902. /* Initiator = 1/Receiver = 0 */
  903. u8 ba_direction;
  904. u8 padding[3];
  905. } __packed;
  906. struct wl1271_acx_ba_receiver_setup {
  907. struct acx_header header;
  908. /* Specifies Link Id, Range 0-31, 0xFF means ANY Link Id */
  909. u8 link_id;
  910. u8 tid;
  911. u8 enable;
  912. u8 padding[1];
  913. /* Windows size in number of packets */
  914. u16 win_size;
  915. /* BA session starting sequence number. RANGE 0-FFF */
  916. u16 ssn;
  917. } __packed;
  918. struct wl1271_acx_fw_tsf_information {
  919. struct acx_header header;
  920. __le32 current_tsf_high;
  921. __le32 current_tsf_low;
  922. __le32 last_bttt_high;
  923. __le32 last_tbtt_low;
  924. u8 last_dtim_count;
  925. u8 padding[3];
  926. } __packed;
  927. struct wl1271_acx_ap_max_tx_retry {
  928. struct acx_header header;
  929. /*
  930. * the number of frames transmission failures before
  931. * issuing the aging event.
  932. */
  933. __le16 max_tx_retry;
  934. u8 padding_1[2];
  935. } __packed;
  936. struct wl1271_acx_sta_max_tx_retry {
  937. struct acx_header header;
  938. u8 max_tx_retry;
  939. u8 padding_1[3];
  940. } __packed;
  941. struct wl1271_acx_config_ps {
  942. struct acx_header header;
  943. u8 exit_retries;
  944. u8 enter_retries;
  945. u8 padding[2];
  946. __le32 null_data_rate;
  947. } __packed;
  948. struct wl1271_acx_inconnection_sta {
  949. struct acx_header header;
  950. u8 addr[ETH_ALEN];
  951. u8 padding1[2];
  952. } __packed;
  953. /*
  954. * ACX_FM_COEX_CFG
  955. * set the FM co-existence parameters.
  956. */
  957. struct wl1271_acx_fm_coex {
  958. struct acx_header header;
  959. /* enable(1) / disable(0) the FM Coex feature */
  960. u8 enable;
  961. /*
  962. * Swallow period used in COEX PLL swallowing mechanism.
  963. * 0xFF = use FW default
  964. */
  965. u8 swallow_period;
  966. /*
  967. * The N divider used in COEX PLL swallowing mechanism for Fref of
  968. * 38.4/19.2 Mhz. 0xFF = use FW default
  969. */
  970. u8 n_divider_fref_set_1;
  971. /*
  972. * The N divider used in COEX PLL swallowing mechanism for Fref of
  973. * 26/52 Mhz. 0xFF = use FW default
  974. */
  975. u8 n_divider_fref_set_2;
  976. /*
  977. * The M divider used in COEX PLL swallowing mechanism for Fref of
  978. * 38.4/19.2 Mhz. 0xFFFF = use FW default
  979. */
  980. __le16 m_divider_fref_set_1;
  981. /*
  982. * The M divider used in COEX PLL swallowing mechanism for Fref of
  983. * 26/52 Mhz. 0xFFFF = use FW default
  984. */
  985. __le16 m_divider_fref_set_2;
  986. /*
  987. * The time duration in uSec required for COEX PLL to stabilize.
  988. * 0xFFFFFFFF = use FW default
  989. */
  990. __le32 coex_pll_stabilization_time;
  991. /*
  992. * The time duration in uSec required for LDO to stabilize.
  993. * 0xFFFFFFFF = use FW default
  994. */
  995. __le16 ldo_stabilization_time;
  996. /*
  997. * The disturbed frequency band margin around the disturbed frequency
  998. * center (single sided).
  999. * For example, if 2 is configured, the following channels will be
  1000. * considered disturbed channel:
  1001. * 80 +- 0.1 MHz, 91 +- 0.1 MHz, 98 +- 0.1 MHz, 102 +- 0.1 MH
  1002. * 0xFF = use FW default
  1003. */
  1004. u8 fm_disturbed_band_margin;
  1005. /*
  1006. * The swallow clock difference of the swallowing mechanism.
  1007. * 0xFF = use FW default
  1008. */
  1009. u8 swallow_clk_diff;
  1010. } __packed;
  1011. enum {
  1012. ACX_WAKE_UP_CONDITIONS = 0x0002,
  1013. ACX_MEM_CFG = 0x0003,
  1014. ACX_SLOT = 0x0004,
  1015. ACX_AC_CFG = 0x0007,
  1016. ACX_MEM_MAP = 0x0008,
  1017. ACX_AID = 0x000A,
  1018. /* ACX_FW_REV is missing in the ref driver, but seems to work */
  1019. ACX_FW_REV = 0x000D,
  1020. ACX_MEDIUM_USAGE = 0x000F,
  1021. ACX_RX_CFG = 0x0010,
  1022. ACX_TX_QUEUE_CFG = 0x0011, /* FIXME: only used by wl1251 */
  1023. ACX_STATISTICS = 0x0013, /* Debug API */
  1024. ACX_PWR_CONSUMPTION_STATISTICS = 0x0014,
  1025. ACX_FEATURE_CFG = 0x0015,
  1026. ACX_TID_CFG = 0x001A,
  1027. ACX_PS_RX_STREAMING = 0x001B,
  1028. ACX_BEACON_FILTER_OPT = 0x001F,
  1029. ACX_NOISE_HIST = 0x0021,
  1030. ACX_HDK_VERSION = 0x0022, /* ??? */
  1031. ACX_PD_THRESHOLD = 0x0023,
  1032. ACX_TX_CONFIG_OPT = 0x0024,
  1033. ACX_CCA_THRESHOLD = 0x0025,
  1034. ACX_EVENT_MBOX_MASK = 0x0026,
  1035. ACX_CONN_MONIT_PARAMS = 0x002D,
  1036. ACX_CONS_TX_FAILURE = 0x002F,
  1037. ACX_BCN_DTIM_OPTIONS = 0x0031,
  1038. ACX_SG_ENABLE = 0x0032,
  1039. ACX_SG_CFG = 0x0033,
  1040. ACX_FM_COEX_CFG = 0x0034,
  1041. ACX_BEACON_FILTER_TABLE = 0x0038,
  1042. ACX_ARP_IP_FILTER = 0x0039,
  1043. ACX_ROAMING_STATISTICS_TBL = 0x003B,
  1044. ACX_RATE_POLICY = 0x003D,
  1045. ACX_CTS_PROTECTION = 0x003E,
  1046. ACX_SLEEP_AUTH = 0x003F,
  1047. ACX_PREAMBLE_TYPE = 0x0040,
  1048. ACX_ERROR_CNT = 0x0041,
  1049. ACX_IBSS_FILTER = 0x0044,
  1050. ACX_SERVICE_PERIOD_TIMEOUT = 0x0045,
  1051. ACX_TSF_INFO = 0x0046,
  1052. ACX_CONFIG_PS_WMM = 0x0049,
  1053. ACX_ENABLE_RX_DATA_FILTER = 0x004A,
  1054. ACX_SET_RX_DATA_FILTER = 0x004B,
  1055. ACX_GET_DATA_FILTER_STATISTICS = 0x004C,
  1056. ACX_RX_CONFIG_OPT = 0x004E,
  1057. ACX_FRAG_CFG = 0x004F,
  1058. ACX_BET_ENABLE = 0x0050,
  1059. ACX_RSSI_SNR_TRIGGER = 0x0051,
  1060. ACX_RSSI_SNR_WEIGHTS = 0x0052,
  1061. ACX_KEEP_ALIVE_MODE = 0x0053,
  1062. ACX_SET_KEEP_ALIVE_CONFIG = 0x0054,
  1063. ACX_BA_SESSION_POLICY_CFG = 0x0055,
  1064. ACX_BA_SESSION_RX_SETUP = 0x0056,
  1065. ACX_PEER_HT_CAP = 0x0057,
  1066. ACX_HT_BSS_OPERATION = 0x0058,
  1067. ACX_COEX_ACTIVITY = 0x0059,
  1068. ACX_SET_DCO_ITRIM_PARAMS = 0x0061,
  1069. ACX_GEN_FW_CMD = 0x0070,
  1070. ACX_HOST_IF_CFG_BITMAP = 0x0071,
  1071. ACX_MAX_TX_FAILURE = 0x0072,
  1072. ACX_UPDATE_INCONNECTION_STA_LIST = 0x0073,
  1073. DOT11_RX_MSDU_LIFE_TIME = 0x1004,
  1074. DOT11_CUR_TX_PWR = 0x100D,
  1075. DOT11_RX_DOT11_MODE = 0x1012,
  1076. DOT11_RTS_THRESHOLD = 0x1013,
  1077. DOT11_GROUP_ADDRESS_TBL = 0x1014,
  1078. ACX_PM_CONFIG = 0x1016,
  1079. ACX_CONFIG_PS = 0x1017,
  1080. ACX_CONFIG_HANGOVER = 0x1018,
  1081. };
  1082. int wl1271_acx_wake_up_conditions(struct wl1271 *wl);
  1083. int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth);
  1084. int wl1271_acx_tx_power(struct wl1271 *wl, int power);
  1085. int wl1271_acx_feature_cfg(struct wl1271 *wl);
  1086. int wl1271_acx_mem_map(struct wl1271 *wl,
  1087. struct acx_header *mem_map, size_t len);
  1088. int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl);
  1089. int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter);
  1090. int wl1271_acx_pd_threshold(struct wl1271 *wl);
  1091. int wl1271_acx_slot(struct wl1271 *wl, enum acx_slot_type slot_time);
  1092. int wl1271_acx_group_address_tbl(struct wl1271 *wl, bool enable,
  1093. void *mc_list, u32 mc_list_len);
  1094. int wl1271_acx_service_period_timeout(struct wl1271 *wl);
  1095. int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold);
  1096. int wl1271_acx_dco_itrim_params(struct wl1271 *wl);
  1097. int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter);
  1098. int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
  1099. int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable);
  1100. int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable);
  1101. int wl1271_acx_sg_cfg(struct wl1271 *wl);
  1102. int wl1271_acx_cca_threshold(struct wl1271 *wl);
  1103. int wl1271_acx_bcn_dtim_options(struct wl1271 *wl);
  1104. int wl1271_acx_aid(struct wl1271 *wl, u16 aid);
  1105. int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask);
  1106. int wl1271_acx_set_preamble(struct wl1271 *wl, enum acx_preamble_type preamble);
  1107. int wl1271_acx_cts_protect(struct wl1271 *wl,
  1108. enum acx_ctsprotect_type ctsprotect);
  1109. int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats);
  1110. int wl1271_acx_sta_rate_policies(struct wl1271 *wl);
  1111. int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
  1112. u8 idx);
  1113. int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
  1114. u8 aifsn, u16 txop);
  1115. int wl1271_acx_tid_cfg(struct wl1271 *wl, u8 queue_id, u8 channel_type,
  1116. u8 tsid, u8 ps_scheme, u8 ack_policy,
  1117. u32 apsd_conf0, u32 apsd_conf1);
  1118. int wl1271_acx_frag_threshold(struct wl1271 *wl, u16 frag_threshold);
  1119. int wl1271_acx_tx_config_options(struct wl1271 *wl);
  1120. int wl1271_acx_ap_mem_cfg(struct wl1271 *wl);
  1121. int wl1271_acx_sta_mem_cfg(struct wl1271 *wl);
  1122. int wl1271_acx_init_mem_config(struct wl1271 *wl);
  1123. int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap);
  1124. int wl1271_acx_init_rx_interrupt(struct wl1271 *wl);
  1125. int wl1271_acx_smart_reflex(struct wl1271 *wl);
  1126. int wl1271_acx_bet_enable(struct wl1271 *wl, bool enable);
  1127. int wl1271_acx_arp_ip_filter(struct wl1271 *wl, u8 enable, __be32 address);
  1128. int wl1271_acx_pm_config(struct wl1271 *wl);
  1129. int wl1271_acx_keep_alive_mode(struct wl1271 *wl, bool enable);
  1130. int wl1271_acx_keep_alive_config(struct wl1271 *wl, u8 index, u8 tpl_valid);
  1131. int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, bool enable,
  1132. s16 thold, u8 hyst);
  1133. int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl);
  1134. int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
  1135. struct ieee80211_sta_ht_cap *ht_cap,
  1136. bool allow_ht_operation);
  1137. int wl1271_acx_set_ht_information(struct wl1271 *wl,
  1138. u16 ht_operation_mode);
  1139. int wl1271_acx_set_ba_session(struct wl1271 *wl,
  1140. enum ieee80211_back_parties direction,
  1141. u8 tid_index, u8 policy);
  1142. int wl1271_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, u16 ssn,
  1143. bool enable);
  1144. int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime);
  1145. int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl);
  1146. int wl1271_acx_sta_max_tx_retry(struct wl1271 *wl);
  1147. int wl1271_acx_config_ps(struct wl1271 *wl);
  1148. int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr);
  1149. int wl1271_acx_fm_coex(struct wl1271 *wl);
  1150. #endif /* __WL1271_ACX_H__ */