1
2
3
4
5
6
7
8
9 #ifndef __WL12XX_ACX_H__
10 #define __WL12XX_ACX_H__
11
12 #include "../wlcore/wlcore.h"
13 #include "../wlcore/acx.h"
14
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 | \
21 WL1271_ACX_INTR_DATA)
22
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 | \
27 WL1271_ACX_INTR_DATA)
28
29 struct wl1271_acx_host_config_bitmap {
30 struct acx_header header;
31
32 __le32 host_cfg_bitmap;
33 } __packed;
34
35 struct wl12xx_acx_tx_statistics {
36 __le32 internal_desc_overflow;
37 } __packed;
38
39 struct wl12xx_acx_rx_statistics {
40 __le32 out_of_mem;
41 __le32 hdr_overflow;
42 __le32 hw_stuck;
43 __le32 dropped;
44 __le32 fcs_err;
45 __le32 xfr_hint_trig;
46 __le32 path_reset;
47 __le32 reset_counter;
48 } __packed;
49
50 struct wl12xx_acx_dma_statistics {
51 __le32 rx_requested;
52 __le32 rx_errors;
53 __le32 tx_requested;
54 __le32 tx_errors;
55 } __packed;
56
57 struct wl12xx_acx_isr_statistics {
58
59 __le32 cmd_cmplt;
60
61
62 __le32 fiqs;
63
64
65 __le32 rx_headers;
66
67
68 __le32 rx_completes;
69
70
71 __le32 rx_mem_overflow;
72
73
74 __le32 rx_rdys;
75
76
77 __le32 irqs;
78
79
80 __le32 tx_procs;
81
82
83 __le32 decrypt_done;
84
85
86 __le32 dma0_done;
87
88
89 __le32 dma1_done;
90
91
92 __le32 tx_exch_complete;
93
94
95 __le32 commands;
96
97
98 __le32 rx_procs;
99
100
101 __le32 hw_pm_mode_changes;
102
103
104 __le32 host_acknowledges;
105
106
107 __le32 pci_pm;
108
109
110 __le32 wakeups;
111
112
113 __le32 low_rssi;
114 } __packed;
115
116 struct wl12xx_acx_wep_statistics {
117
118 __le32 addr_key_count;
119
120
121 __le32 default_key_count;
122
123 __le32 reserved;
124
125
126 __le32 key_not_found;
127
128
129 __le32 decrypt_fail;
130
131
132 __le32 packets;
133
134
135 __le32 interrupt;
136 } __packed;
137
138 #define ACX_MISSED_BEACONS_SPREAD 10
139
140 struct wl12xx_acx_pwr_statistics {
141
142 __le32 ps_enter;
143
144
145 __le32 elp_enter;
146
147
148 __le32 missing_bcns;
149
150
151 __le32 wake_on_host;
152
153
154 __le32 wake_on_timer_exp;
155
156
157 __le32 tx_with_ps;
158
159
160 __le32 tx_without_ps;
161
162
163 __le32 rcvd_beacons;
164
165
166 __le32 power_save_off;
167
168
169 __le16 enable_ps;
170
171
172
173
174
175 __le16 disable_ps;
176
177
178
179
180
181 __le32 fix_tsf_ps;
182
183
184
185
186
187
188
189
190
191
192 __le32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD];
193
194
195 __le32 rcvd_awake_beacons;
196 } __packed;
197
198 struct wl12xx_acx_mic_statistics {
199 __le32 rx_pkts;
200 __le32 calc_failure;
201 } __packed;
202
203 struct wl12xx_acx_aes_statistics {
204 __le32 encrypt_fail;
205 __le32 decrypt_fail;
206 __le32 encrypt_packets;
207 __le32 decrypt_packets;
208 __le32 encrypt_interrupt;
209 __le32 decrypt_interrupt;
210 } __packed;
211
212 struct wl12xx_acx_event_statistics {
213 __le32 heart_beat;
214 __le32 calibration;
215 __le32 rx_mismatch;
216 __le32 rx_mem_empty;
217 __le32 rx_pool;
218 __le32 oom_late;
219 __le32 phy_transmit_error;
220 __le32 tx_stuck;
221 } __packed;
222
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;
231 } __packed;
232
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;
239 } __packed;
240
241 struct wl12xx_acx_statistics {
242 struct acx_header header;
243
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;
255 } __packed;
256
257 int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap);
258
259 #endif