1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 #ifndef __iwl_fw_api_stats_h__
65 #define __iwl_fw_api_stats_h__
66 #include "mac.h"
67
68 struct mvm_statistics_dbg {
69 __le32 burst_check;
70 __le32 burst_count;
71 __le32 wait_for_silence_timeout_cnt;
72 u8 reserved[12];
73 } __packed;
74
75 struct mvm_statistics_div {
76 __le32 tx_on_a;
77 __le32 tx_on_b;
78 __le32 exec_time;
79 __le32 probe_time;
80 __le32 rssi_ant;
81 __le32 reserved2;
82 } __packed;
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109 struct mvm_statistics_rx_non_phy {
110 __le32 bogus_cts;
111 __le32 bogus_ack;
112 __le32 non_channel_beacons;
113 __le32 channel_beacons;
114 __le32 num_missed_bcon;
115 __le32 adc_rx_saturation_time;
116 __le32 ina_detection_search_time;
117 __le32 beacon_silence_rssi_a;
118 __le32 beacon_silence_rssi_b;
119 __le32 beacon_silence_rssi_c;
120 __le32 interference_data_flag;
121 __le32 channel_load;
122 __le32 beacon_rssi_a;
123 __le32 beacon_rssi_b;
124 __le32 beacon_rssi_c;
125 __le32 beacon_energy_a;
126 __le32 beacon_energy_b;
127 __le32 beacon_energy_c;
128 __le32 num_bt_kills;
129 __le32 mac_id;
130 } __packed;
131
132 struct mvm_statistics_rx_non_phy_v3 {
133 __le32 bogus_cts;
134 __le32 bogus_ack;
135 __le32 non_bssid_frames;
136
137 __le32 filtered_frames;
138
139 __le32 non_channel_beacons;
140
141 __le32 channel_beacons;
142
143 __le32 num_missed_bcon;
144 __le32 adc_rx_saturation_time;
145
146 __le32 ina_detection_search_time;
147
148 __le32 beacon_silence_rssi_a;
149 __le32 beacon_silence_rssi_b;
150 __le32 beacon_silence_rssi_c;
151 __le32 interference_data_flag;
152
153
154 __le32 channel_load;
155 __le32 dsp_false_alarms;
156
157 __le32 beacon_rssi_a;
158 __le32 beacon_rssi_b;
159 __le32 beacon_rssi_c;
160 __le32 beacon_energy_a;
161 __le32 beacon_energy_b;
162 __le32 beacon_energy_c;
163 __le32 num_bt_kills;
164 __le32 mac_id;
165 __le32 directed_data_mpdu;
166 } __packed;
167
168 struct mvm_statistics_rx_phy {
169 __le32 unresponded_rts;
170 __le32 rxe_frame_lmt_overrun;
171 __le32 sent_ba_rsp_cnt;
172 __le32 dsp_self_kill;
173 __le32 reserved;
174 } __packed;
175
176 struct mvm_statistics_rx_phy_v2 {
177 __le32 ina_cnt;
178 __le32 fina_cnt;
179 __le32 plcp_err;
180 __le32 crc32_err;
181 __le32 overrun_err;
182 __le32 early_overrun_err;
183 __le32 crc32_good;
184 __le32 false_alarm_cnt;
185 __le32 fina_sync_err_cnt;
186 __le32 sfd_timeout;
187 __le32 fina_timeout;
188 __le32 unresponded_rts;
189 __le32 rxe_frame_lmt_overrun;
190 __le32 sent_ack_cnt;
191 __le32 sent_cts_cnt;
192 __le32 sent_ba_rsp_cnt;
193 __le32 dsp_self_kill;
194 __le32 mh_format_err;
195 __le32 re_acq_main_rssi_sum;
196 __le32 reserved;
197 } __packed;
198
199 struct mvm_statistics_rx_ht_phy_v1 {
200 __le32 plcp_err;
201 __le32 overrun_err;
202 __le32 early_overrun_err;
203 __le32 crc32_good;
204 __le32 crc32_err;
205 __le32 mh_format_err;
206 __le32 agg_crc32_good;
207 __le32 agg_mpdu_cnt;
208 __le32 agg_cnt;
209 __le32 unsupport_mcs;
210 } __packed;
211
212 struct mvm_statistics_rx_ht_phy {
213 __le32 mh_format_err;
214 __le32 agg_mpdu_cnt;
215 __le32 agg_cnt;
216 __le32 unsupport_mcs;
217 } __packed;
218
219 struct mvm_statistics_tx_non_phy_v3 {
220 __le32 preamble_cnt;
221 __le32 rx_detected_cnt;
222 __le32 bt_prio_defer_cnt;
223 __le32 bt_prio_kill_cnt;
224 __le32 few_bytes_cnt;
225 __le32 cts_timeout;
226 __le32 ack_timeout;
227 __le32 expected_ack_cnt;
228 __le32 actual_ack_cnt;
229 __le32 dump_msdu_cnt;
230 __le32 burst_abort_next_frame_mismatch_cnt;
231 __le32 burst_abort_missing_next_frame_cnt;
232 __le32 cts_timeout_collision;
233 __le32 ack_or_ba_timeout_collision;
234 } __packed;
235
236 struct mvm_statistics_tx_non_phy {
237 __le32 bt_prio_defer_cnt;
238 __le32 bt_prio_kill_cnt;
239 __le32 few_bytes_cnt;
240 __le32 cts_timeout;
241 __le32 ack_timeout;
242 __le32 dump_msdu_cnt;
243 __le32 burst_abort_next_frame_mismatch_cnt;
244 __le32 burst_abort_missing_next_frame_cnt;
245 __le32 cts_timeout_collision;
246 __le32 ack_or_ba_timeout_collision;
247 } __packed;
248
249 #define MAX_CHAINS 3
250
251 struct mvm_statistics_tx_non_phy_agg {
252 __le32 ba_timeout;
253 __le32 ba_reschedule_frames;
254 __le32 scd_query_agg_frame_cnt;
255 __le32 scd_query_no_agg;
256 __le32 scd_query_agg;
257 __le32 scd_query_mismatch;
258 __le32 frame_not_ready;
259 __le32 underrun;
260 __le32 bt_prio_kill;
261 __le32 rx_ba_rsp_cnt;
262 __s8 txpower[MAX_CHAINS];
263 __s8 reserved;
264 __le32 reserved2;
265 } __packed;
266
267 struct mvm_statistics_tx_channel_width {
268 __le32 ext_cca_narrow_ch20[1];
269 __le32 ext_cca_narrow_ch40[2];
270 __le32 ext_cca_narrow_ch80[3];
271 __le32 ext_cca_narrow_ch160[4];
272 __le32 last_tx_ch_width_indx;
273 __le32 rx_detected_per_ch_width[4];
274 __le32 success_per_ch_width[4];
275 __le32 fail_per_ch_width[4];
276 };
277
278 struct mvm_statistics_tx_v4 {
279 struct mvm_statistics_tx_non_phy_v3 general;
280 struct mvm_statistics_tx_non_phy_agg agg;
281 struct mvm_statistics_tx_channel_width channel_width;
282 } __packed;
283
284 struct mvm_statistics_tx {
285 struct mvm_statistics_tx_non_phy general;
286 struct mvm_statistics_tx_non_phy_agg agg;
287 struct mvm_statistics_tx_channel_width channel_width;
288 } __packed;
289
290
291 struct mvm_statistics_bt_activity {
292 __le32 hi_priority_tx_req_cnt;
293 __le32 hi_priority_tx_denied_cnt;
294 __le32 lo_priority_tx_req_cnt;
295 __le32 lo_priority_tx_denied_cnt;
296 __le32 hi_priority_rx_req_cnt;
297 __le32 hi_priority_rx_denied_cnt;
298 __le32 lo_priority_rx_req_cnt;
299 __le32 lo_priority_rx_denied_cnt;
300 } __packed;
301
302 struct mvm_statistics_general_common_v19 {
303 __le32 radio_temperature;
304 __le32 radio_voltage;
305 struct mvm_statistics_dbg dbg;
306 __le32 sleep_time;
307 __le32 slots_out;
308 __le32 slots_idle;
309 __le32 ttl_timestamp;
310 struct mvm_statistics_div slow_div;
311 __le32 rx_enable_counter;
312
313
314
315
316
317 __le32 num_of_sos_states;
318 __le32 beacon_filtered;
319 __le32 missed_beacons;
320 u8 beacon_filter_average_energy;
321 u8 beacon_filter_reason;
322 u8 beacon_filter_current_energy;
323 u8 beacon_filter_reserved;
324 __le32 beacon_filter_delta_time;
325 struct mvm_statistics_bt_activity bt_activity;
326 __le64 rx_time;
327 __le64 on_time_rf;
328 __le64 on_time_scan;
329 __le64 tx_time;
330 } __packed;
331
332 struct mvm_statistics_general_common {
333 __le32 radio_temperature;
334 struct mvm_statistics_dbg dbg;
335 __le32 sleep_time;
336 __le32 slots_out;
337 __le32 slots_idle;
338 __le32 ttl_timestamp;
339 struct mvm_statistics_div slow_div;
340 __le32 rx_enable_counter;
341
342
343
344
345
346 __le32 num_of_sos_states;
347 __le32 beacon_filtered;
348 __le32 missed_beacons;
349 u8 beacon_filter_average_energy;
350 u8 beacon_filter_reason;
351 u8 beacon_filter_current_energy;
352 u8 beacon_filter_reserved;
353 __le32 beacon_filter_delta_time;
354 struct mvm_statistics_bt_activity bt_activity;
355 __le64 rx_time;
356 __le64 on_time_rf;
357 __le64 on_time_scan;
358 __le64 tx_time;
359 } __packed;
360
361 struct mvm_statistics_general_v8 {
362 struct mvm_statistics_general_common_v19 common;
363 __le32 beacon_counter[NUM_MAC_INDEX];
364 u8 beacon_average_energy[NUM_MAC_INDEX];
365 u8 reserved[4 - (NUM_MAC_INDEX % 4)];
366 } __packed;
367
368 struct mvm_statistics_general {
369 struct mvm_statistics_general_common common;
370 __le32 beacon_counter[MAC_INDEX_AUX];
371 u8 beacon_average_energy[MAC_INDEX_AUX];
372 u8 reserved[8 - MAC_INDEX_AUX];
373 } __packed;
374
375
376
377
378
379
380
381
382 struct mvm_statistics_load {
383 __le32 air_time[MAC_INDEX_AUX];
384 __le32 byte_count[MAC_INDEX_AUX];
385 __le32 pkt_count[MAC_INDEX_AUX];
386 u8 avg_energy[IWL_MVM_STATION_COUNT];
387 } __packed;
388
389 struct mvm_statistics_load_v1 {
390 __le32 air_time[NUM_MAC_INDEX];
391 __le32 byte_count[NUM_MAC_INDEX];
392 __le32 pkt_count[NUM_MAC_INDEX];
393 u8 avg_energy[IWL_MVM_STATION_COUNT];
394 } __packed;
395
396 struct mvm_statistics_rx {
397 struct mvm_statistics_rx_phy ofdm;
398 struct mvm_statistics_rx_phy cck;
399 struct mvm_statistics_rx_non_phy general;
400 struct mvm_statistics_rx_ht_phy ofdm_ht;
401 } __packed;
402
403 struct mvm_statistics_rx_v3 {
404 struct mvm_statistics_rx_phy_v2 ofdm;
405 struct mvm_statistics_rx_phy_v2 cck;
406 struct mvm_statistics_rx_non_phy_v3 general;
407 struct mvm_statistics_rx_ht_phy_v1 ofdm_ht;
408 } __packed;
409
410
411
412
413
414
415
416
417
418 struct iwl_notif_statistics_v10 {
419 __le32 flag;
420 struct mvm_statistics_rx_v3 rx;
421 struct mvm_statistics_tx_v4 tx;
422 struct mvm_statistics_general_v8 general;
423 } __packed;
424
425 struct iwl_notif_statistics_v11 {
426 __le32 flag;
427 struct mvm_statistics_rx_v3 rx;
428 struct mvm_statistics_tx_v4 tx;
429 struct mvm_statistics_general_v8 general;
430 struct mvm_statistics_load_v1 load_stats;
431 } __packed;
432
433 struct iwl_notif_statistics {
434 __le32 flag;
435 struct mvm_statistics_rx rx;
436 struct mvm_statistics_tx tx;
437 struct mvm_statistics_general general;
438 struct mvm_statistics_load load_stats;
439 } __packed;
440
441
442
443
444
445 enum iwl_statistics_notif_flags {
446 IWL_STATISTICS_REPLY_FLG_CLEAR = 0x1,
447 };
448
449
450
451
452
453
454
455
456 enum iwl_statistics_cmd_flags {
457 IWL_STATISTICS_FLG_CLEAR = 0x1,
458 IWL_STATISTICS_FLG_DISABLE_NOTIF = 0x2,
459 };
460
461
462
463
464
465 struct iwl_statistics_cmd {
466 __le32 flags;
467 } __packed;
468
469 #endif