2 * This file is part of wl12xx
4 * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
5 * Copyright (C) 2008-2010 Nokia Corporation
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.
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.
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
23 #ifndef __WL12XX_ACX_H__
24 #define __WL12XX_ACX_H__
26 #include "../wlcore/wlcore.h"
27 #include "../wlcore/acx.h"
29 #define WL12XX_ACX_ALL_EVENTS_VECTOR (WL1271_ACX_INTR_WATCHDOG | \
30 WL1271_ACX_INTR_INIT_COMPLETE | \
31 WL1271_ACX_INTR_EVENT_A | \
32 WL1271_ACX_INTR_EVENT_B | \
33 WL1271_ACX_INTR_CMD_COMPLETE | \
34 WL1271_ACX_INTR_HW_AVAILABLE | \
37 #define WL12XX_INTR_MASK (WL1271_ACX_INTR_WATCHDOG | \
38 WL1271_ACX_INTR_EVENT_A | \
39 WL1271_ACX_INTR_EVENT_B | \
40 WL1271_ACX_INTR_HW_AVAILABLE | \
43 struct wl1271_acx_host_config_bitmap
{
44 struct acx_header header
;
46 __le32 host_cfg_bitmap
;
49 struct wl12xx_acx_tx_statistics
{
50 __le32 internal_desc_overflow
;
53 struct wl12xx_acx_rx_statistics
{
64 struct wl12xx_acx_dma_statistics
{
71 struct wl12xx_acx_isr_statistics
{
72 /* host command complete */
78 /* (INT_STS_ND & INT_TRIG_RX_HEADER) */
81 /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */
84 /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */
85 __le32 rx_mem_overflow
;
87 /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */
93 /* (INT_STS_ND & INT_TRIG_TX_PROC) */
96 /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */
99 /* (INT_STS_ND & INT_TRIG_DMA0) */
102 /* (INT_STS_ND & INT_TRIG_DMA1) */
105 /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */
106 __le32 tx_exch_complete
;
108 /* (INT_STS_ND & INT_TRIG_COMMAND) */
111 /* (INT_STS_ND & INT_TRIG_RX_PROC) */
114 /* (INT_STS_ND & INT_TRIG_PM_802) */
115 __le32 hw_pm_mode_changes
;
117 /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */
118 __le32 host_acknowledges
;
120 /* (INT_STS_ND & INT_TRIG_PM_PCI) */
123 /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */
126 /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */
130 struct wl12xx_acx_wep_statistics
{
131 /* WEP address keys configured */
132 __le32 addr_key_count
;
134 /* default keys configured */
135 __le32 default_key_count
;
139 /* number of times that WEP key not found on lookup */
140 __le32 key_not_found
;
142 /* number of times that WEP key decryption failed */
145 /* WEP packets decrypted */
148 /* WEP decrypt interrupts */
152 #define ACX_MISSED_BEACONS_SPREAD 10
154 struct wl12xx_acx_pwr_statistics
{
155 /* the amount of enters into power save mode (both PD & ELP) */
158 /* the amount of enters into ELP mode */
161 /* the amount of missing beacon interrupts to the host */
164 /* the amount of wake on host-access times */
167 /* the amount of wake on timer-expire */
168 __le32 wake_on_timer_exp
;
170 /* the number of packets that were transmitted with PS bit set */
173 /* the number of packets that were transmitted with PS bit clear */
174 __le32 tx_without_ps
;
176 /* the number of received beacons */
179 /* the number of entering into PowerOn (power save off) */
180 __le32 power_save_off
;
182 /* the number of entries into power save mode */
186 * the number of exits from power save, not including failed PS
192 * the number of times the TSF counter was adjusted because
197 /* Gives statistics about the spread continuous missed beacons.
198 * The 16 LSB are dedicated for the PS mode.
199 * The 16 MSB are dedicated for the PS mode.
200 * cont_miss_bcns_spread[0] - single missed beacon.
201 * cont_miss_bcns_spread[1] - two continuous missed beacons.
202 * cont_miss_bcns_spread[2] - three continuous missed beacons.
204 * cont_miss_bcns_spread[9] - ten and more continuous missed beacons.
206 __le32 cont_miss_bcns_spread
[ACX_MISSED_BEACONS_SPREAD
];
208 /* the number of beacons in awake mode */
209 __le32 rcvd_awake_beacons
;
212 struct wl12xx_acx_mic_statistics
{
217 struct wl12xx_acx_aes_statistics
{
220 __le32 encrypt_packets
;
221 __le32 decrypt_packets
;
222 __le32 encrypt_interrupt
;
223 __le32 decrypt_interrupt
;
226 struct wl12xx_acx_event_statistics
{
233 __le32 phy_transmit_error
;
237 struct wl12xx_acx_ps_statistics
{
238 __le32 pspoll_timeouts
;
239 __le32 upsd_timeouts
;
240 __le32 upsd_max_sptime
;
241 __le32 upsd_max_apturn
;
242 __le32 pspoll_max_apturn
;
243 __le32 pspoll_utilization
;
244 __le32 upsd_utilization
;
247 struct wl12xx_acx_rxpipe_statistics
{
248 __le32 rx_prep_beacon_drop
;
249 __le32 descr_host_int_trig_rx_data
;
250 __le32 beacon_buffer_thres_host_int_trig_rx_data
;
251 __le32 missed_beacon_host_int_trig_rx_data
;
252 __le32 tx_xfr_host_int_trig_rx_data
;
255 struct wl12xx_acx_statistics
{
256 struct acx_header header
;
258 struct wl12xx_acx_tx_statistics tx
;
259 struct wl12xx_acx_rx_statistics rx
;
260 struct wl12xx_acx_dma_statistics dma
;
261 struct wl12xx_acx_isr_statistics isr
;
262 struct wl12xx_acx_wep_statistics wep
;
263 struct wl12xx_acx_pwr_statistics pwr
;
264 struct wl12xx_acx_aes_statistics aes
;
265 struct wl12xx_acx_mic_statistics mic
;
266 struct wl12xx_acx_event_statistics event
;
267 struct wl12xx_acx_ps_statistics ps
;
268 struct wl12xx_acx_rxpipe_statistics rxpipe
;
271 int wl1271_acx_host_if_cfg_bitmap(struct wl1271
*wl
, u32 host_cfg_bitmap
);
273 #endif /* __WL12XX_ACX_H__ */