2 * This file is part of wl18xx
4 * Copyright (C) 2011 Texas Instruments. All rights reserved.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 #ifndef __WL18XX_ACX_H__
23 #define __WL18XX_ACX_H__
25 #include "../wlcore/wlcore.h"
26 #include "../wlcore/acx.h"
28 /* numbers of bits the length field takes (add 1 for the actual number) */
29 #define WL18XX_HOST_IF_LEN_SIZE_FIELD 15
31 struct wl18xx_acx_host_config_bitmap {
32 struct acx_header header;
34 __le32 host_cfg_bitmap;
36 __le32 host_sdio_block_size;
38 /* extra mem blocks per frame in TX. */
39 __le32 extra_mem_blocks;
42 * number of bits of the length field in the first TX word
43 * (up to 15 - for using the entire 16 bits).
45 __le32 length_field_size;
50 CHECKSUM_OFFLOAD_DISABLED = 0,
51 CHECKSUM_OFFLOAD_ENABLED = 1,
52 CHECKSUM_OFFLOAD_FAKE_RX = 2,
53 CHECKSUM_OFFLOAD_INVALID = 0xFF
56 struct wl18xx_acx_checksum_state {
57 struct acx_header header;
59 /* enum acx_checksum_state */
64 struct wl18xx_acx_debug_stats {
73 struct wl18xx_acx_ring_stats {
83 struct wl18xx_acx_tx_stats {
84 u32 tx_template_prepared;
86 u32 tx_template_programmed;
87 u32 tx_data_programmed;
88 u32 tx_burst_programmed;
91 u32 tx_start_templates;
92 u32 tx_start_int_templates;
95 u32 tx_start_null_frame;
97 u32 tx_retry_template;
101 u32 tx_exch_mismatch;
102 u32 tx_done_template;
104 u32 tx_done_int_template;
107 u32 tx_xfr_out_of_mem;
108 u32 tx_dma_programmed;
112 struct wl18xx_acx_rx_stats {
116 u32 rx_dropped_frame;
117 u32 rx_complete_dropped_frame;
134 struct wl18xx_acx_dma_stats {
139 struct wl18xx_acx_isr_stats {
143 struct wl18xx_acx_wep_stats {
144 u32 wep_add_key_count;
145 u32 wep_default_key_count;
146 u32 wep_key_not_found;
147 u32 wep_decrypt_fail;
148 u32 wep_encrypt_fail;
150 u32 wep_dec_interrupt;
152 u32 wep_enc_interrupts;
155 #define PWR_STAT_MAX_CONT_MISSED_BCNS_SPREAD 10
157 struct wl18xx_acx_pwr_stats {
158 u32 missing_bcns_cnt;
160 u32 connection_out_of_sync;
161 u32 cont_miss_bcns_spread[PWR_STAT_MAX_CONT_MISSED_BCNS_SPREAD];
162 u32 rcvd_awake_bcns_cnt;
165 struct wl18xx_acx_mic_stats {
167 u32 mic_calc_failure;
170 struct wl18xx_acx_aes_stats {
171 u32 aes_encrypt_fail;
172 u32 aes_decrypt_fail;
173 u32 aes_encrypt_packets;
174 u32 aes_decrypt_packets;
175 u32 aes_encrypt_interrupt;
176 u32 aes_decrypt_interrupt;
179 struct wl18xx_acx_gem_stats {
180 u32 gem_encrypt_fail;
181 u32 gem_decrypt_fail;
182 u32 gem_encrypt_packets;
183 u32 gem_decrypt_packets;
184 u32 gem_encrypt_interrupt;
185 u32 gem_decrypt_interrupt;
188 struct wl18xx_acx_event_stats {
194 struct wl18xx_acx_ps_poll_stats {
195 u32 ps_poll_timeouts;
197 u32 upsd_max_ap_turn;
198 u32 ps_poll_max_ap_turn;
199 u32 ps_poll_utilization;
200 u32 upsd_utilization;
203 struct wl18xx_acx_rx_filter_stats {
210 u32 protection_filter;
213 struct wl18xx_acx_calibration_stats {
215 u32 init_radio_bands_fail;
217 u32 init_tx_clpc_fail;
218 u32 init_rx_iw_mm_fail;
220 u32 tune_drpw_rtrim_fail;
221 u32 tune_drpw_pd_buf_fail;
222 u32 tune_drpw_tx_mix_freq_fail;
223 u32 tune_drpw_ta_cal;
224 u32 tune_drpw_rx_if_2_gain;
225 u32 tune_drpw_rx_dac;
226 u32 tune_drpw_chan_tune;
227 u32 tune_drpw_rx_tx_lpf;
228 u32 tune_drpw_lna_tank;
229 u32 tune_tx_lo_leak_fail;
230 u32 tune_tx_iq_mm_fail;
231 u32 tune_tx_pdet_fail;
232 u32 tune_tx_ppa_fail;
233 u32 tune_tx_clpc_fail;
234 u32 tune_rx_ana_dc_fail;
235 u32 tune_rx_dig_dc_fail; /* check if this is needed */
236 u32 tune_rx_iq_mm_fail;
240 struct wl18xx_acx_statistics {
241 struct acx_header header;
243 struct wl18xx_acx_ring_stats ring;
244 struct wl18xx_acx_debug_stats debug;
245 struct wl18xx_acx_tx_stats tx;
246 struct wl18xx_acx_rx_stats rx;
247 struct wl18xx_acx_dma_stats dma;
248 struct wl18xx_acx_isr_stats isr;
249 struct wl18xx_acx_wep_stats wep;
250 struct wl18xx_acx_pwr_stats pwr;
251 struct wl18xx_acx_aes_stats aes;
252 struct wl18xx_acx_mic_stats mic;
253 struct wl18xx_acx_event_stats event;
254 struct wl18xx_acx_ps_poll_stats ps_poll;
255 struct wl18xx_acx_rx_filter_stats rx_filter;
256 struct wl18xx_acx_calibration_stats calibration;
257 struct wl18xx_acx_gem_stats gem;
260 int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap,
261 u32 sdio_blk_size, u32 extra_mem_blks,
263 int wl18xx_acx_set_checksum_state(struct wl1271 *wl);
265 #endif /* __WL18XX_ACX_H__ */