acx.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. /*
  2. * This file is part of wl12xx
  3. *
  4. * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
  5. * Copyright (C) 2008-2010 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 __WL12XX_ACX_H__
  23. #define __WL12XX_ACX_H__
  24. #include "../wlcore/wlcore.h"
  25. #include "../wlcore/acx.h"
  26. struct wl1271_acx_host_config_bitmap {
  27. struct acx_header header;
  28. __le32 host_cfg_bitmap;
  29. } __packed;
  30. struct wl12xx_acx_tx_statistics {
  31. __le32 internal_desc_overflow;
  32. } __packed;
  33. struct wl12xx_acx_rx_statistics {
  34. __le32 out_of_mem;
  35. __le32 hdr_overflow;
  36. __le32 hw_stuck;
  37. __le32 dropped;
  38. __le32 fcs_err;
  39. __le32 xfr_hint_trig;
  40. __le32 path_reset;
  41. __le32 reset_counter;
  42. } __packed;
  43. struct wl12xx_acx_dma_statistics {
  44. __le32 rx_requested;
  45. __le32 rx_errors;
  46. __le32 tx_requested;
  47. __le32 tx_errors;
  48. } __packed;
  49. struct wl12xx_acx_isr_statistics {
  50. /* host command complete */
  51. __le32 cmd_cmplt;
  52. /* fiqisr() */
  53. __le32 fiqs;
  54. /* (INT_STS_ND & INT_TRIG_RX_HEADER) */
  55. __le32 rx_headers;
  56. /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */
  57. __le32 rx_completes;
  58. /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */
  59. __le32 rx_mem_overflow;
  60. /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */
  61. __le32 rx_rdys;
  62. /* irqisr() */
  63. __le32 irqs;
  64. /* (INT_STS_ND & INT_TRIG_TX_PROC) */
  65. __le32 tx_procs;
  66. /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */
  67. __le32 decrypt_done;
  68. /* (INT_STS_ND & INT_TRIG_DMA0) */
  69. __le32 dma0_done;
  70. /* (INT_STS_ND & INT_TRIG_DMA1) */
  71. __le32 dma1_done;
  72. /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */
  73. __le32 tx_exch_complete;
  74. /* (INT_STS_ND & INT_TRIG_COMMAND) */
  75. __le32 commands;
  76. /* (INT_STS_ND & INT_TRIG_RX_PROC) */
  77. __le32 rx_procs;
  78. /* (INT_STS_ND & INT_TRIG_PM_802) */
  79. __le32 hw_pm_mode_changes;
  80. /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */
  81. __le32 host_acknowledges;
  82. /* (INT_STS_ND & INT_TRIG_PM_PCI) */
  83. __le32 pci_pm;
  84. /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */
  85. __le32 wakeups;
  86. /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */
  87. __le32 low_rssi;
  88. } __packed;
  89. struct wl12xx_acx_wep_statistics {
  90. /* WEP address keys configured */
  91. __le32 addr_key_count;
  92. /* default keys configured */
  93. __le32 default_key_count;
  94. __le32 reserved;
  95. /* number of times that WEP key not found on lookup */
  96. __le32 key_not_found;
  97. /* number of times that WEP key decryption failed */
  98. __le32 decrypt_fail;
  99. /* WEP packets decrypted */
  100. __le32 packets;
  101. /* WEP decrypt interrupts */
  102. __le32 interrupt;
  103. } __packed;
  104. #define ACX_MISSED_BEACONS_SPREAD 10
  105. struct wl12xx_acx_pwr_statistics {
  106. /* the amount of enters into power save mode (both PD & ELP) */
  107. __le32 ps_enter;
  108. /* the amount of enters into ELP mode */
  109. __le32 elp_enter;
  110. /* the amount of missing beacon interrupts to the host */
  111. __le32 missing_bcns;
  112. /* the amount of wake on host-access times */
  113. __le32 wake_on_host;
  114. /* the amount of wake on timer-expire */
  115. __le32 wake_on_timer_exp;
  116. /* the number of packets that were transmitted with PS bit set */
  117. __le32 tx_with_ps;
  118. /* the number of packets that were transmitted with PS bit clear */
  119. __le32 tx_without_ps;
  120. /* the number of received beacons */
  121. __le32 rcvd_beacons;
  122. /* the number of entering into PowerOn (power save off) */
  123. __le32 power_save_off;
  124. /* the number of entries into power save mode */
  125. __le16 enable_ps;
  126. /*
  127. * the number of exits from power save, not including failed PS
  128. * transitions
  129. */
  130. __le16 disable_ps;
  131. /*
  132. * the number of times the TSF counter was adjusted because
  133. * of drift
  134. */
  135. __le32 fix_tsf_ps;
  136. /* Gives statistics about the spread continuous missed beacons.
  137. * The 16 LSB are dedicated for the PS mode.
  138. * The 16 MSB are dedicated for the PS mode.
  139. * cont_miss_bcns_spread[0] - single missed beacon.
  140. * cont_miss_bcns_spread[1] - two continuous missed beacons.
  141. * cont_miss_bcns_spread[2] - three continuous missed beacons.
  142. * ...
  143. * cont_miss_bcns_spread[9] - ten and more continuous missed beacons.
  144. */
  145. __le32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD];
  146. /* the number of beacons in awake mode */
  147. __le32 rcvd_awake_beacons;
  148. } __packed;
  149. struct wl12xx_acx_mic_statistics {
  150. __le32 rx_pkts;
  151. __le32 calc_failure;
  152. } __packed;
  153. struct wl12xx_acx_aes_statistics {
  154. __le32 encrypt_fail;
  155. __le32 decrypt_fail;
  156. __le32 encrypt_packets;
  157. __le32 decrypt_packets;
  158. __le32 encrypt_interrupt;
  159. __le32 decrypt_interrupt;
  160. } __packed;
  161. struct wl12xx_acx_event_statistics {
  162. __le32 heart_beat;
  163. __le32 calibration;
  164. __le32 rx_mismatch;
  165. __le32 rx_mem_empty;
  166. __le32 rx_pool;
  167. __le32 oom_late;
  168. __le32 phy_transmit_error;
  169. __le32 tx_stuck;
  170. } __packed;
  171. struct wl12xx_acx_ps_statistics {
  172. __le32 pspoll_timeouts;
  173. __le32 upsd_timeouts;
  174. __le32 upsd_max_sptime;
  175. __le32 upsd_max_apturn;
  176. __le32 pspoll_max_apturn;
  177. __le32 pspoll_utilization;
  178. __le32 upsd_utilization;
  179. } __packed;
  180. struct wl12xx_acx_rxpipe_statistics {
  181. __le32 rx_prep_beacon_drop;
  182. __le32 descr_host_int_trig_rx_data;
  183. __le32 beacon_buffer_thres_host_int_trig_rx_data;
  184. __le32 missed_beacon_host_int_trig_rx_data;
  185. __le32 tx_xfr_host_int_trig_rx_data;
  186. } __packed;
  187. struct wl12xx_acx_statistics {
  188. struct acx_header header;
  189. struct wl12xx_acx_tx_statistics tx;
  190. struct wl12xx_acx_rx_statistics rx;
  191. struct wl12xx_acx_dma_statistics dma;
  192. struct wl12xx_acx_isr_statistics isr;
  193. struct wl12xx_acx_wep_statistics wep;
  194. struct wl12xx_acx_pwr_statistics pwr;
  195. struct wl12xx_acx_aes_statistics aes;
  196. struct wl12xx_acx_mic_statistics mic;
  197. struct wl12xx_acx_event_statistics event;
  198. struct wl12xx_acx_ps_statistics ps;
  199. struct wl12xx_acx_rxpipe_statistics rxpipe;
  200. } __packed;
  201. int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap);
  202. #endif /* __WL12XX_ACX_H__ */