1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * This file is part of wl12xx
5 * Copyright (C) 1998-2009, 2011 Texas Instruments. All rights reserved.
6 * Copyright (C) 2008-2010 Nokia Corporation
9 #ifndef __WL12XX_ACX_H__
10 #define __WL12XX_ACX_H__
12 #include "../wlcore/wlcore.h"
13 #include "../wlcore/acx.h"
15 #define WL12XX_ACX_ALL_EVENTS_VECTOR (WL1271_ACX_INTR_WATCHDOG | \
16 WL1271_ACX_INTR_INIT_COMPLETE | \
17 WL1271_ACX_INTR_EVENT_A | \
18 WL1271_ACX_INTR_EVENT_B | \
19 WL1271_ACX_INTR_CMD_COMPLETE | \
20 WL1271_ACX_INTR_HW_AVAILABLE | \
23 #define WL12XX_INTR_MASK (WL1271_ACX_INTR_WATCHDOG | \
24 WL1271_ACX_INTR_EVENT_A | \
25 WL1271_ACX_INTR_EVENT_B | \
26 WL1271_ACX_INTR_HW_AVAILABLE | \
29 struct wl1271_acx_host_config_bitmap
{
30 struct acx_header header
;
32 __le32 host_cfg_bitmap
;
35 struct wl12xx_acx_tx_statistics
{
36 __le32 internal_desc_overflow
;
39 struct wl12xx_acx_rx_statistics
{
50 struct wl12xx_acx_dma_statistics
{
57 struct wl12xx_acx_isr_statistics
{
58 /* host command complete */
64 /* (INT_STS_ND & INT_TRIG_RX_HEADER) */
67 /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */
70 /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */
71 __le32 rx_mem_overflow
;
73 /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */
79 /* (INT_STS_ND & INT_TRIG_TX_PROC) */
82 /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */
85 /* (INT_STS_ND & INT_TRIG_DMA0) */
88 /* (INT_STS_ND & INT_TRIG_DMA1) */
91 /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */
92 __le32 tx_exch_complete
;
94 /* (INT_STS_ND & INT_TRIG_COMMAND) */
97 /* (INT_STS_ND & INT_TRIG_RX_PROC) */
100 /* (INT_STS_ND & INT_TRIG_PM_802) */
101 __le32 hw_pm_mode_changes
;
103 /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */
104 __le32 host_acknowledges
;
106 /* (INT_STS_ND & INT_TRIG_PM_PCI) */
109 /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */
112 /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */
116 struct wl12xx_acx_wep_statistics
{
117 /* WEP address keys configured */
118 __le32 addr_key_count
;
120 /* default keys configured */
121 __le32 default_key_count
;
125 /* number of times that WEP key not found on lookup */
126 __le32 key_not_found
;
128 /* number of times that WEP key decryption failed */
131 /* WEP packets decrypted */
134 /* WEP decrypt interrupts */
138 #define ACX_MISSED_BEACONS_SPREAD 10
140 struct wl12xx_acx_pwr_statistics
{
141 /* the amount of enters into power save mode (both PD & ELP) */
144 /* the amount of enters into ELP mode */
147 /* the amount of missing beacon interrupts to the host */
150 /* the amount of wake on host-access times */
153 /* the amount of wake on timer-expire */
154 __le32 wake_on_timer_exp
;
156 /* the number of packets that were transmitted with PS bit set */
159 /* the number of packets that were transmitted with PS bit clear */
160 __le32 tx_without_ps
;
162 /* the number of received beacons */
165 /* the number of entering into PowerOn (power save off) */
166 __le32 power_save_off
;
168 /* the number of entries into power save mode */
172 * the number of exits from power save, not including failed PS
178 * the number of times the TSF counter was adjusted because
183 /* Gives statistics about the spread continuous missed beacons.
184 * The 16 LSB are dedicated for the PS mode.
185 * The 16 MSB are dedicated for the PS mode.
186 * cont_miss_bcns_spread[0] - single missed beacon.
187 * cont_miss_bcns_spread[1] - two continuous missed beacons.
188 * cont_miss_bcns_spread[2] - three continuous missed beacons.
190 * cont_miss_bcns_spread[9] - ten and more continuous missed beacons.
192 __le32 cont_miss_bcns_spread
[ACX_MISSED_BEACONS_SPREAD
];
194 /* the number of beacons in awake mode */
195 __le32 rcvd_awake_beacons
;
198 struct wl12xx_acx_mic_statistics
{
203 struct wl12xx_acx_aes_statistics
{
206 __le32 encrypt_packets
;
207 __le32 decrypt_packets
;
208 __le32 encrypt_interrupt
;
209 __le32 decrypt_interrupt
;
212 struct wl12xx_acx_event_statistics
{
219 __le32 phy_transmit_error
;
223 struct wl12xx_acx_ps_statistics
{
224 __le32 pspoll_timeouts
;
225 __le32 upsd_timeouts
;
226 __le32 upsd_max_sptime
;
227 __le32 upsd_max_apturn
;
228 __le32 pspoll_max_apturn
;
229 __le32 pspoll_utilization
;
230 __le32 upsd_utilization
;
233 struct wl12xx_acx_rxpipe_statistics
{
234 __le32 rx_prep_beacon_drop
;
235 __le32 descr_host_int_trig_rx_data
;
236 __le32 beacon_buffer_thres_host_int_trig_rx_data
;
237 __le32 missed_beacon_host_int_trig_rx_data
;
238 __le32 tx_xfr_host_int_trig_rx_data
;
241 struct wl12xx_acx_statistics
{
242 struct acx_header header
;
244 struct wl12xx_acx_tx_statistics tx
;
245 struct wl12xx_acx_rx_statistics rx
;
246 struct wl12xx_acx_dma_statistics dma
;
247 struct wl12xx_acx_isr_statistics isr
;
248 struct wl12xx_acx_wep_statistics wep
;
249 struct wl12xx_acx_pwr_statistics pwr
;
250 struct wl12xx_acx_aes_statistics aes
;
251 struct wl12xx_acx_mic_statistics mic
;
252 struct wl12xx_acx_event_statistics event
;
253 struct wl12xx_acx_ps_statistics ps
;
254 struct wl12xx_acx_rxpipe_statistics rxpipe
;
257 int wl1271_acx_host_if_cfg_bitmap(struct wl1271
*wl
, u32 host_cfg_bitmap
);
259 #endif /* __WL12XX_ACX_H__ */