bcmdhd_1_77: Import A320F (A320FLXXU2CRE3) Oreo driver
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / drivers / net / wireless / bcmdhd_1_77 / include / event_log_payload.h
CommitLineData
3c2a0909
S
1/*
2 * EVENT_LOG System Definitions
3 *
4 * This file describes the payloads of event log entries that are data buffers
5 * rather than formatted string entries. The contents are generally XTLVs.
6 *
4c205efb 7 * Copyright (C) 1999-2018, Broadcom Corporation
3c2a0909
S
8 *
9 * Unless you and Broadcom execute a separate written software license
10 * agreement governing use of this software, this software is licensed to you
11 * under the terms of the GNU General Public License version 2 (the "GPL"),
12 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
13 * following added to such license:
14 *
15 * As a special exception, the copyright holders of this software give you
16 * permission to link this software with independent modules, and to copy and
17 * distribute the resulting executable under terms of your choice, provided that
18 * you also meet, for each linked independent module, the terms and conditions of
19 * the license of that module. An independent module is a module which is not
20 * derived from this software. The special exception does not apply to any
21 * modifications of the software.
22 *
23 * Notwithstanding the above, under no circumstances may you combine this
24 * software in any way with any other Broadcom software provided under a license
25 * other than the GPL, without Broadcom's express prior written consent.
26 *
27 *
28 * <<Broadcom-WL-IPTag/Open:>>
29 *
4c205efb 30 * $Id: event_log_payload.h 700076 2017-05-17 14:42:22Z $
3c2a0909
S
31 */
32
33#ifndef _EVENT_LOG_PAYLOAD_H_
34#define _EVENT_LOG_PAYLOAD_H_
35
36#include <typedefs.h>
37#include <bcmutils.h>
38#include <ethernet.h>
39#include <event_log_tag.h>
40
41#define EVENT_LOG_XTLV_ID_STR 0 /**< XTLV ID for a string */
42#define EVENT_LOG_XTLV_ID_TXQ_SUM 1 /**< XTLV ID for txq_summary_t */
43#define EVENT_LOG_XTLV_ID_SCBDATA_SUM 2 /**< XTLV ID for cb_subq_summary_t */
44#define EVENT_LOG_XTLV_ID_SCBDATA_AMPDU_TX_SUM 3 /**< XTLV ID for scb_ampdu_tx_summary_t */
45#define EVENT_LOG_XTLV_ID_BSSCFGDATA_SUM 4 /**< XTLV ID for bsscfg_q_summary_t */
46#define EVENT_LOG_XTLV_ID_UCTXSTATUS 5 /**< XTLV ID for ucode TxStatus array */
47#define EVENT_LOG_XTLV_ID_TXQ_SUM_V2 6 /**< XTLV ID for txq_summary_v2_t */
48
49/**
50 * An XTLV holding a string
51 * String is not null terminated, length is the XTLV len.
52 */
53typedef struct xtlv_string {
54 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_STR */
55 uint16 len; /* XTLV Len (String length) */
56 char str[1]; /* var len array characters */
57} xtlv_string_t;
58
59#define XTLV_STRING_FULL_LEN(str_len) (BCM_XTLV_HDR_SIZE + (str_len) * sizeof(char))
60
61/**
62 * Summary for a single TxQ context
63 * Two of these will be used per TxQ context---one for the high TxQ, and one for
64 * the low txq that contains DMA prepared pkts. The high TxQ is a full multi-precidence
65 * queue and also has a BSSCFG map to identify the BSSCFGS associated with the queue context.
66 * The low txq counterpart does not populate the BSSCFG map.
67 * The excursion queue will have no bsscfgs associated and is the first queue dumped.
68 */
69typedef struct txq_summary {
70 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_TXQ_SUM */
71 uint16 len; /* XTLV Len */
72 uint32 bsscfg_map; /* bitmap of bsscfg indexes associated with this queue */
73 uint32 stopped; /* flow control bitmap */
74 uint8 prec_count; /* count of precedences/fifos and len of following array */
75 uint8 pad;
76 uint16 plen[1]; /* var len array of lengths of each prec/fifo in the queue */
77} txq_summary_t;
78
79#define TXQ_SUMMARY_LEN (OFFSETOF(txq_summary_t, plen))
80#define TXQ_SUMMARY_FULL_LEN(num_q) (TXQ_SUMMARY_LEN + (num_q) * sizeof(uint16))
81
82typedef struct txq_summary_v2 {
83 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_TXQ_SUM_V2 */
84 uint16 len; /* XTLV Len */
85 uint32 bsscfg_map; /* bitmap of bsscfg indexes associated with this queue */
86 uint32 stopped; /* flow control bitmap */
87 uint32 hw_stopped; /* flow control bitmap */
88 uint8 prec_count; /* count of precedences/fifos and len of following array */
89 uint8 pad;
90 uint16 plen[1]; /* var len array of lengths of each prec/fifo in the queue */
91} txq_summary_v2_t;
92
93#define TXQ_SUMMARY_V2_LEN (OFFSETOF(txq_summary_v2_t, plen))
94#define TXQ_SUMMARY_V2_FULL_LEN(num_q) (TXQ_SUMMARY_V2_LEN + (num_q) * sizeof(uint16))
95
96/**
97 * Summary for tx datapath of an SCB cubby
98 * This is a generic summary structure (one size fits all) with
99 * a cubby ID and sub-ID to differentiate SCB cubby types and possible sub-queues.
100 */
101typedef struct scb_subq_summary {
102 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_SCBDATA_SUM */
103 uint16 len; /* XTLV Len */
104 uint32 flags; /* cubby specficic flags */
105 uint8 cubby_id; /* ID registered for cubby */
106 uint8 sub_id; /* sub ID if a cubby has more than one queue */
107 uint8 prec_count; /* count of precedences/fifos and len of following array */
108 uint8 pad;
109 uint16 plen[1]; /* var len array of lengths of each prec/fifo in the queue */
110} scb_subq_summary_t;
111
112#define SCB_SUBQ_SUMMARY_LEN (OFFSETOF(scb_subq_summary_t, plen))
113#define SCB_SUBQ_SUMMARY_FULL_LEN(num_q) (SCB_SUBQ_SUMMARY_LEN + (num_q) * sizeof(uint16))
114
115/* scb_subq_summary_t.flags for APPS */
116#define SCBDATA_APPS_F_PS 0x00000001
117#define SCBDATA_APPS_F_PSPEND 0x00000002
118#define SCBDATA_APPS_F_INPVB 0x00000004
119#define SCBDATA_APPS_F_APSD_USP 0x00000008
120#define SCBDATA_APPS_F_TXBLOCK 0x00000010
121#define SCBDATA_APPS_F_APSD_HPKT_TMR 0x00000020
122#define SCBDATA_APPS_F_APSD_TX_PEND 0x00000040
123#define SCBDATA_APPS_F_INTRANS 0x00000080
124#define SCBDATA_APPS_F_OFF_PEND 0x00000100
125#define SCBDATA_APPS_F_OFF_BLOCKED 0x00000200
126#define SCBDATA_APPS_F_OFF_IN_PROG 0x00000400
127
128
129/**
130 * Summary for tx datapath AMPDU SCB cubby
131 * This is a specific data structure to describe the AMPDU datapath state for an SCB
132 * used instead of scb_subq_summary_t.
133 * Info is for one TID, so one will be dumped per BA TID active for an SCB.
134 */
135typedef struct scb_ampdu_tx_summary {
136 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_SCBDATA_AMPDU_TX_SUM */
137 uint16 len; /* XTLV Len */
138 uint32 flags; /* misc flags */
139 uint8 tid; /* initiator TID (priority) */
140 uint8 ba_state; /* internal BA state */
141 uint8 bar_cnt; /* number of bars sent with no progress */
142 uint8 retry_bar; /* reason code if bar to be retried at watchdog */
143 uint16 barpending_seq; /* seqnum for bar */
144 uint16 bar_ackpending_seq; /* seqnum of bar for which ack is pending */
145 uint16 start_seq; /* seqnum of the first unacknowledged packet */
146 uint16 max_seq; /* max unacknowledged seqnum sent */
147 uint32 released_bytes_inflight; /* Number of bytes pending in bytes */
148 uint32 released_bytes_target;
149} scb_ampdu_tx_summary_t;
150
151/* scb_ampdu_tx_summary.flags defs */
152#define SCBDATA_AMPDU_TX_F_BAR_ACKPEND 0x00000001 /* bar_ackpending */
153
154/** XTLV stuct to summarize a BSSCFG's packet queue */
155typedef struct bsscfg_q_summary {
156 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_BSSCFGDATA_SUM */
157 uint16 len; /* XTLV Len */
158 struct ether_addr BSSID; /* BSSID */
159 uint8 bsscfg_idx; /* bsscfg index */
160 uint8 type; /* bsscfg type enumeration: BSSCFG_TYPE_XXX */
161 uint8 subtype; /* bsscfg subtype enumeration: BSSCFG_SUBTYPE_XXX */
162 uint8 prec_count; /* count of precedences/fifos and len of following array */
163 uint16 plen[1]; /* var len array of lengths of each prec/fifo in the queue */
164} bsscfg_q_summary_t;
165
166#define BSSCFG_Q_SUMMARY_LEN (OFFSETOF(bsscfg_q_summary_t, plen))
167#define BSSCFG_Q_SUMMARY_FULL_LEN(num_q) (BSSCFG_Q_SUMMARY_LEN + (num_q) * sizeof(uint16))
168
169/**
170 * An XTLV holding a TxStats array
171 * TxStatus entries are 8 or 16 bytes, size in words (2 or 4) givent in
172 * entry_size field.
173 * Array is uint32 words
174 */
175typedef struct xtlv_uc_txs {
176 uint16 id; /* XTLV ID: EVENT_LOG_XTLV_ID_UCTXSTATUS */
177 uint16 len; /* XTLV Len */
178 uint8 entry_size; /* num uint32 words per entry */
179 uint8 pad[3]; /* reserved, zero */
180 uint32 w[1]; /* var len array of words */
181} xtlv_uc_txs_t;
182
183#define XTLV_UCTXSTATUS_LEN (OFFSETOF(xtlv_uc_txs_t, w))
184#define XTLV_UCTXSTATUS_FULL_LEN(words) (XTLV_UCTXSTATUS_LEN + (words) * sizeof(uint32))
185
186#define SCAN_SUMMARY_VERSION 1
187/* Scan flags */
188#define SCAN_SUM_CHAN_INFO 0x1
189/* Scan_sum flags */
190#define BAND5G_SIB_ENAB 0x2
191#define BAND2G_SIB_ENAB 0x4
192#define PARALLEL_SCAN 0x8
193#define SCAN_ABORT 0x10
194
195/* scan_channel_info flags */
196#define ACTIVE_SCAN_SCN_SUM 0x2
197#define SCAN_SUM_WLC_CORE0 0x4
198#define SCAN_SUM_WLC_CORE1 0x8
199#define HOME_CHAN 0x10
200
201typedef struct wl_scan_ssid_info
202{
203 uint8 ssid_len; /* the length of SSID */
204 uint8 ssid[32]; /* SSID string */
205} wl_scan_ssid_info_t;
206
207typedef struct wl_scan_channel_info {
208 uint16 chanspec; /* chanspec scanned */
209 uint16 reserv;
210 uint32 start_time; /* Scan start time in
211 * milliseconds for the chanspec
212 * or home_dwell time start
213 */
214 uint32 end_time; /* Scan end time in
215 * milliseconds for the chanspec
216 * or home_dwell time end
217 */
218 uint16 probe_count; /* No of probes sent out. For future use
219 */
220 uint16 scn_res_count; /* Count of scan_results found per
221 * channel. For future use
222 */
223} wl_scan_channel_info_t;
224
225typedef struct wl_scan_summary_info {
226 uint32 total_chan_num; /* Total number of channels scanned */
227 uint32 scan_start_time; /* Scan start time in milliseconds */
228 uint32 scan_end_time; /* Scan end time in milliseconds */
229 wl_scan_ssid_info_t ssid[1]; /* SSID being scanned in current
230 * channel. For future use
231 */
232} wl_scan_summary_info_t;
233
234struct wl_scan_summary {
235 uint8 version; /* Version */
236 uint8 reserved;
237 uint16 len; /* Length of the data buffer including SSID
238 * list.
239 */
240 uint16 sync_id; /* Scan Sync ID */
241 uint16 scan_flags; /* flags [0] or SCAN_SUM_CHAN_INFO = */
242 /* channel_info, if not set */
243 /* it is scan_summary_info */
244 /* when channel_info is used, */
245 /* the following flag bits are overridden: */
246 /* flags[1] or ACTIVE_SCAN_SCN_SUM = active channel if set */
247 /* passive if not set */
248 /* flags[2] or WLC_CORE0 = if set, represents wlc_core0 */
249 /* flags[3] or WLC_CORE1 = if set, represents wlc_core1 */
250 /* flags[4] or HOME_CHAN = if set, represents home-channel */
251 /* flags[5:15] = reserved */
252 /* when scan_summary_info is used, */
253 /* the following flag bits are used: */
254 /* flags[1] or BAND5G_SIB_ENAB = */
255 /* allowSIBParallelPassiveScan on 5G band */
256 /* flags[2] or BAND2G_SIB_ENAB = */
257 /* allowSIBParallelPassiveScan on 2G band */
258 /* flags[3] or PARALLEL_SCAN = Parallel scan enabled or not */
259 /* flags[4] or SCAN_ABORT = SCAN_ABORTED scenario */
260 /* flags[5:15] = reserved */
261 union {
262 wl_scan_channel_info_t scan_chan_info; /* scan related information
263 * for each channel scanned
264 */
265 wl_scan_summary_info_t scan_sum_info; /* Cumulative scan related
266 * information.
267 */
268 } u;
269};
270
271/* Channel switch log record structure
272 * Host may map the following structure on channel switch event log record
273 * received from dongle. Note that all payload entries in event log record are
274 * uint32/int32.
275 */
276typedef struct wl_chansw_event_log_record {
277 uint32 time; /* Time in us */
278 uint32 old_chanspec; /* Old channel spec */
279 uint32 new_chanspec; /* New channel spec */
280 uint32 chansw_reason; /* Reason for channel change */
281 int32 dwell_time;
282} wl_chansw_event_log_record_t;
283
284/* Sub-block type for EVENT_LOG_TAG_AMPDU_DUMP */
285#define WL_AMPDU_STATS_TYPE_RXMCSx1 0 /* RX MCS rate (Nss = 1) */
286#define WL_AMPDU_STATS_TYPE_RXMCSx2 1
287#define WL_AMPDU_STATS_TYPE_RXMCSx3 2
288#define WL_AMPDU_STATS_TYPE_RXMCSx4 3
289#define WL_AMPDU_STATS_TYPE_RXVHTx1 4 /* RX VHT rate (Nss = 1) */
290#define WL_AMPDU_STATS_TYPE_RXVHTx2 5
291#define WL_AMPDU_STATS_TYPE_RXVHTx3 6
292#define WL_AMPDU_STATS_TYPE_RXVHTx4 7
293#define WL_AMPDU_STATS_TYPE_TXMCSx1 8 /* TX MCS rate (Nss = 1) */
294#define WL_AMPDU_STATS_TYPE_TXMCSx2 9
295#define WL_AMPDU_STATS_TYPE_TXMCSx3 10
296#define WL_AMPDU_STATS_TYPE_TXMCSx4 11
297#define WL_AMPDU_STATS_TYPE_TXVHTx1 12 /* TX VHT rate (Nss = 1) */
298#define WL_AMPDU_STATS_TYPE_TXVHTx2 13
299#define WL_AMPDU_STATS_TYPE_TXVHTx3 14
300#define WL_AMPDU_STATS_TYPE_TXVHTx4 15
301#define WL_AMPDU_STATS_TYPE_RXMCSSGI 16 /* RX SGI usage (for all MCS rates) */
302#define WL_AMPDU_STATS_TYPE_TXMCSSGI 17 /* TX SGI usage (for all MCS rates) */
303#define WL_AMPDU_STATS_TYPE_RXVHTSGI 18 /* RX SGI usage (for all VHT rates) */
304#define WL_AMPDU_STATS_TYPE_TXVHTSGI 19 /* TX SGI usage (for all VHT rates) */
305#define WL_AMPDU_STATS_TYPE_RXMCSPER 20 /* RX PER (for all MCS rates) */
306#define WL_AMPDU_STATS_TYPE_TXMCSPER 21 /* TX PER (for all MCS rates) */
307#define WL_AMPDU_STATS_TYPE_RXVHTPER 22 /* RX PER (for all VHT rates) */
308#define WL_AMPDU_STATS_TYPE_TXVHTPER 23 /* TX PER (for all VHT rates) */
309#define WL_AMPDU_STATS_TYPE_RXDENS 24 /* RX AMPDU density */
310#define WL_AMPDU_STATS_TYPE_TXDENS 25 /* TX AMPDU density */
311#define WL_AMPDU_STATS_TYPE_RXMCSOK 26 /* RX all MCS rates */
312#define WL_AMPDU_STATS_TYPE_RXVHTOK 27 /* RX all VHT rates */
313#define WL_AMPDU_STATS_TYPE_TXMCSALL 28 /* TX all MCS rates */
314#define WL_AMPDU_STATS_TYPE_TXVHTALL 29 /* TX all VHT rates */
315#define WL_AMPDU_STATS_TYPE_TXMCSOK 30 /* TX all MCS rates */
316#define WL_AMPDU_STATS_TYPE_TXVHTOK 31 /* TX all VHT rates */
317
318#define WL_AMPDU_STATS_MAX_CNTS 64
319
320typedef struct {
321 uint16 type; /* AMPDU statistics sub-type */
322 uint16 len; /* Number of 32-bit counters */
323 uint32 counters[WL_AMPDU_STATS_MAX_CNTS];
324} wl_ampdu_stats_generic_t;
325
326typedef struct {
327 uint16 type; /* AMPDU statistics sub-type */
328 uint16 len; /* Number of 32-bit counters + 2 */
329 uint32 total_ampdu;
330 uint32 total_mpdu;
331 uint32 aggr_dist[WL_AMPDU_STATS_MAX_CNTS + 1];
332} wl_ampdu_stats_aggrsz_t;
333
334/* Sub-block type for EVENT_LOG_TAG_MSCHPROFILE */
335#define WL_MSCH_PROFILER_START 0 /* start event check */
336#define WL_MSCH_PROFILER_EXIT 1 /* exit event check */
337#define WL_MSCH_PROFILER_REQ 2 /* request event */
338#define WL_MSCH_PROFILER_CALLBACK 3 /* call back event */
339#define WL_MSCH_PROFILER_MESSAGE 4 /* message event */
340#define WL_MSCH_PROFILER_PROFILE_START 5
341#define WL_MSCH_PROFILER_PROFILE_END 6
342#define WL_MSCH_PROFILER_REQ_HANDLE 7
343#define WL_MSCH_PROFILER_REQ_ENTITY 8
344#define WL_MSCH_PROFILER_CHAN_CTXT 9
345#define WL_MSCH_PROFILER_EVENT_LOG 10
346#define WL_MSCH_PROFILER_REQ_TIMING 11
347#define WL_MSCH_PROFILER_TYPE_MASK 0x00ff
348#define WL_MSCH_PROFILER_WLINDEX_SHIFT 8
349#define WL_MSCH_PROFILER_WLINDEX_MASK 0x0f00
350#define WL_MSCH_PROFILER_VER_SHIFT 12
351#define WL_MSCH_PROFILER_VER_MASK 0xf000
352
353/* MSCH Event data current verion */
354#define WL_MSCH_PROFILER_VER 2
355
356/* msch version history */
357#define WL_MSCH_PROFILER_RSDB_VER 1
358#define WL_MSCH_PROFILER_REPORT_VER 2
359
360/* msch collect header size */
361#define WL_MSCH_PROFILE_HEAD_SIZE OFFSETOF(msch_collect_tlv_t, value)
362
363/* msch event log header size */
364#define WL_MSCH_EVENT_LOG_HEAD_SIZE OFFSETOF(msch_event_log_profiler_event_data_t, data)
365
366/* MSCH data buffer size */
367#define WL_MSCH_PROFILER_BUFFER_SIZE 512
368
369/* request type used in wlc_msch_req_param_t struct */
370#define WL_MSCH_RT_BOTH_FIXED 0 /* both start and end time is fixed */
371#define WL_MSCH_RT_START_FLEX 1 /* start time is flexible and duration is fixed */
372#define WL_MSCH_RT_DUR_FLEX 2 /* start time is fixed and end time is flexible */
373#define WL_MSCH_RT_BOTH_FLEX 3 /* Both start and duration is flexible */
374
375/* Flags used in wlc_msch_req_param_t struct */
376#define WL_MSCH_REQ_FLAGS_CHAN_CONTIGUOUS (1 << 0) /* Don't break up channels in chanspec_list */
377#define WL_MSCH_REQ_FLAGS_MERGE_CONT_SLOTS (1 << 1) /* No slot end if slots are continous */
378#define WL_MSCH_REQ_FLAGS_PREMTABLE (1 << 2) /* Req can be pre-empted by PREMT_CURTS req */
379#define WL_MSCH_REQ_FLAGS_PREMT_CURTS (1 << 3) /* Pre-empt request at the end of curts */
380#define WL_MSCH_REQ_FLAGS_PREMT_IMMEDIATE (1 << 4) /* Pre-empt cur_ts immediately */
381
382/* Requested slot Callback states
383 * req->pend_slot/cur_slot->flags
384 */
385#define WL_MSCH_RC_FLAGS_ONCHAN_FIRE (1 << 0)
386#define WL_MSCH_RC_FLAGS_START_FIRE_DONE (1 << 1)
387#define WL_MSCH_RC_FLAGS_END_FIRE_DONE (1 << 2)
388#define WL_MSCH_RC_FLAGS_ONFIRE_DONE (1 << 3)
389#define WL_MSCH_RC_FLAGS_SPLIT_SLOT_START (1 << 4)
390#define WL_MSCH_RC_FLAGS_SPLIT_SLOT_END (1 << 5)
391#define WL_MSCH_RC_FLAGS_PRE_ONFIRE_DONE (1 << 6)
392
393/* Request entity flags */
394#define WL_MSCH_ENTITY_FLAG_MULTI_INSTANCE (1 << 0)
395
396/* Request Handle flags */
397#define WL_MSCH_REQ_HDL_FLAGS_NEW_REQ (1 << 0) /* req_start callback */
398
399/* MSCH state flags (msch_info->flags) */
400#define WL_MSCH_STATE_IN_TIEMR_CTXT 0x1
401#define WL_MSCH_STATE_SCHD_PENDING 0x2
402
403/* MSCH callback type */
404#define WL_MSCH_CT_REQ_START 0x1
405#define WL_MSCH_CT_ON_CHAN 0x2
406#define WL_MSCH_CT_SLOT_START 0x4
407#define WL_MSCH_CT_SLOT_END 0x8
408#define WL_MSCH_CT_SLOT_SKIP 0x10
409#define WL_MSCH_CT_OFF_CHAN 0x20
410#define WL_MSCH_CT_OFF_CHAN_DONE 0x40
411#define WL_MSCH_CT_REQ_END 0x80
412#define WL_MSCH_CT_PARTIAL 0x100
413#define WL_MSCH_CT_PRE_ONCHAN 0x200
414#define WL_MSCH_CT_PRE_REQ_START 0x400
415
416/* MSCH command bits */
417#define WL_MSCH_CMD_ENABLE_BIT 0x01
418#define WL_MSCH_CMD_PROFILE_BIT 0x02
419#define WL_MSCH_CMD_CALLBACK_BIT 0x04
420#define WL_MSCH_CMD_REGISTER_BIT 0x08
421#define WL_MSCH_CMD_ERROR_BIT 0x10
422#define WL_MSCH_CMD_DEBUG_BIT 0x20
423#define WL_MSCH_CMD_INFOM_BIT 0x40
424#define WL_MSCH_CMD_TRACE_BIT 0x80
425#define WL_MSCH_CMD_ALL_BITS 0xfe
426#define WL_MSCH_CMD_SIZE_MASK 0x00ff0000
427#define WL_MSCH_CMD_SIZE_SHIFT 16
428#define WL_MSCH_CMD_VER_MASK 0xff000000
429#define WL_MSCH_CMD_VER_SHIFT 24
430
431/* maximum channels returned by the get valid channels iovar */
432#define WL_MSCH_NUMCHANNELS 64
433
434typedef struct msch_collect_tlv {
435 uint16 type;
436 uint16 size;
437 char value[1];
438} msch_collect_tlv_t;
439
440typedef struct msch_profiler_event_data {
441 uint32 time_lo; /* Request time */
442 uint32 time_hi;
443} msch_profiler_event_data_t;
444
445typedef struct msch_start_profiler_event_data {
446 uint32 time_lo; /* Request time */
447 uint32 time_hi;
448 uint32 status;
449} msch_start_profiler_event_data_t;
450
451typedef struct msch_message_profiler_event_data {
452 uint32 time_lo; /* Request time */
453 uint32 time_hi;
454 char message[1]; /* message */
455} msch_message_profiler_event_data_t;
456
457typedef struct msch_event_log_profiler_event_data {
458 uint32 time_lo; /* Request time */
459 uint32 time_hi;
460 event_log_hdr_t hdr; /* event log header */
461 uint32 data[9]; /* event data */
462} msch_event_log_profiler_event_data_t;
463
464typedef struct msch_req_param_profiler_event_data {
465 uint16 flags; /* Describe various request properties */
466 uint8 req_type; /* Describe start and end time flexiblilty */
467 uint8 priority; /* Define the request priority */
468 uint32 start_time_l; /* Requested start time offset in us unit */
469 uint32 start_time_h;
470 uint32 duration; /* Requested duration in us unit */
471 uint32 interval; /* Requested periodic interval in us unit,
472 * 0 means non-periodic
473 */
474 union {
475 uint32 dur_flex; /* MSCH_REG_DUR_FLEX, min_dur = duration - dur_flex */
476 struct {
477 uint32 min_dur; /* min duration for traffic, maps to home_time */
478 uint32 max_away_dur; /* max acceptable away dur, maps to home_away_time */
479 uint32 hi_prio_time_l;
480 uint32 hi_prio_time_h;
481 uint32 hi_prio_interval; /* repeated high priority interval */
482 } bf;
483 } flex;
484} msch_req_param_profiler_event_data_t;
485
486typedef struct msch_req_timing_profiler_event_data {
487 uint32 p_req_timing;
488 uint32 p_prev;
489 uint32 p_next;
490 uint16 flags;
491 uint16 timeslot_ptr;
492 uint32 fire_time_l;
493 uint32 fire_time_h;
494 uint32 pre_start_time_l;
495 uint32 pre_start_time_h;
496 uint32 start_time_l;
497 uint32 start_time_h;
498 uint32 end_time_l;
499 uint32 end_time_h;
500 uint32 p_timeslot;
501} msch_req_timing_profiler_event_data_t;
502
503typedef struct msch_chan_ctxt_profiler_event_data {
504 uint32 p_chan_ctxt;
505 uint32 p_prev;
506 uint32 p_next;
507 uint16 chanspec;
508 uint16 bf_sch_pending;
509 uint32 bf_link_prev;
510 uint32 bf_link_next;
511 uint32 onchan_time_l;
512 uint32 onchan_time_h;
513 uint32 actual_onchan_dur_l;
514 uint32 actual_onchan_dur_h;
515 uint32 pend_onchan_dur_l;
516 uint32 pend_onchan_dur_h;
517 uint16 req_entity_list_cnt;
518 uint16 req_entity_list_ptr;
519 uint16 bf_entity_list_cnt;
520 uint16 bf_entity_list_ptr;
521 uint32 bf_skipped_count;
522} msch_chan_ctxt_profiler_event_data_t;
523
524typedef struct msch_req_entity_profiler_event_data {
525 uint32 p_req_entity;
526 uint32 req_hdl_link_prev;
527 uint32 req_hdl_link_next;
528 uint32 chan_ctxt_link_prev;
529 uint32 chan_ctxt_link_next;
530 uint32 rt_specific_link_prev;
531 uint32 rt_specific_link_next;
532 uint32 start_fixed_link_prev;
533 uint32 start_fixed_link_next;
534 uint32 both_flex_list_prev;
535 uint32 both_flex_list_next;
536 uint16 chanspec;
537 uint16 priority;
538 uint16 cur_slot_ptr;
539 uint16 pend_slot_ptr;
540 uint16 pad;
541 uint16 chan_ctxt_ptr;
542 uint32 p_chan_ctxt;
543 uint32 p_req_hdl;
544 uint32 bf_last_serv_time_l;
545 uint32 bf_last_serv_time_h;
546 uint16 onchan_chn_idx;
547 uint16 cur_chn_idx;
548 uint32 flags;
549 uint32 actual_start_time_l;
550 uint32 actual_start_time_h;
551 uint32 curts_fire_time_l;
552 uint32 curts_fire_time_h;
553} msch_req_entity_profiler_event_data_t;
554
555typedef struct msch_req_handle_profiler_event_data {
556 uint32 p_req_handle;
557 uint32 p_prev;
558 uint32 p_next;
559 uint32 cb_func;
560 uint32 cb_ctxt;
561 uint16 req_param_ptr;
562 uint16 req_entity_list_cnt;
563 uint16 req_entity_list_ptr;
564 uint16 chan_cnt;
565 uint32 flags;
566 uint16 chanspec_list;
567 uint16 chanspec_cnt;
568 uint16 chan_idx;
569 uint16 last_chan_idx;
570 uint32 req_time_l;
571 uint32 req_time_h;
572} msch_req_handle_profiler_event_data_t;
573
574typedef struct msch_profiler_profiler_event_data {
575 uint32 time_lo; /* Request time */
576 uint32 time_hi;
577 uint32 free_req_hdl_list;
578 uint32 free_req_entity_list;
579 uint32 free_chan_ctxt_list;
580 uint32 free_chanspec_list;
581 uint16 cur_msch_timeslot_ptr;
582 uint16 next_timeslot_ptr;
583 uint32 p_cur_msch_timeslot;
584 uint32 p_next_timeslot;
585 uint32 cur_armed_timeslot;
586 uint32 flags;
587 uint32 ts_id;
588 uint32 service_interval;
589 uint32 max_lo_prio_interval;
590 uint16 flex_list_cnt;
591 uint16 msch_chanspec_alloc_cnt;
592 uint16 msch_req_entity_alloc_cnt;
593 uint16 msch_req_hdl_alloc_cnt;
594 uint16 msch_chan_ctxt_alloc_cnt;
595 uint16 msch_timeslot_alloc_cnt;
596 uint16 msch_req_hdl_list_cnt;
597 uint16 msch_req_hdl_list_ptr;
598 uint16 msch_chan_ctxt_list_cnt;
599 uint16 msch_chan_ctxt_list_ptr;
600 uint16 msch_req_timing_list_cnt;
601 uint16 msch_req_timing_list_ptr;
602 uint16 msch_start_fixed_list_cnt;
603 uint16 msch_start_fixed_list_ptr;
604 uint16 msch_both_flex_req_entity_list_cnt;
605 uint16 msch_both_flex_req_entity_list_ptr;
606 uint16 msch_start_flex_list_cnt;
607 uint16 msch_start_flex_list_ptr;
608 uint16 msch_both_flex_list_cnt;
609 uint16 msch_both_flex_list_ptr;
610 uint32 slotskip_flag;
611} msch_profiler_profiler_event_data_t;
612
613typedef struct msch_req_profiler_event_data {
614 uint32 time_lo; /* Request time */
615 uint32 time_hi;
616 uint16 chanspec_cnt;
617 uint16 chanspec_ptr;
618 uint16 req_param_ptr;
619 uint16 pad;
620} msch_req_profiler_event_data_t;
621
622typedef struct msch_callback_profiler_event_data {
623 uint32 time_lo; /* Request time */
624 uint32 time_hi;
625 uint16 type; /* callback type */
626 uint16 chanspec; /* actual chanspec, may different with requested one */
627 uint32 start_time_l; /* time slot start time low 32bit */
628 uint32 start_time_h; /* time slot start time high 32bit */
629 uint32 end_time_l; /* time slot end time low 32 bit */
630 uint32 end_time_h; /* time slot end time high 32 bit */
631 uint32 timeslot_id; /* unique time slot id */
632 uint32 p_req_hdl;
633 uint32 onchan_idx; /* Current channel index */
634 uint32 cur_chan_seq_start_time_l; /* start time of current sequence */
635 uint32 cur_chan_seq_start_time_h;
636} msch_callback_profiler_event_data_t;
637
638typedef struct msch_timeslot_profiler_event_data {
639 uint32 p_timeslot;
640 uint32 timeslot_id;
641 uint32 pre_start_time_l;
642 uint32 pre_start_time_h;
643 uint32 end_time_l;
644 uint32 end_time_h;
645 uint32 sch_dur_l;
646 uint32 sch_dur_h;
647 uint32 p_chan_ctxt;
648 uint32 fire_time_l;
649 uint32 fire_time_h;
650 uint32 state;
651} msch_timeslot_profiler_event_data_t;
652
653typedef struct msch_register_params {
654 uint16 wlc_index; /* Optional wlc index */
655 uint16 flags; /* Describe various request properties */
656 uint32 req_type; /* Describe start and end time flexiblilty */
657 uint16 id; /* register id */
658 uint16 priority; /* Define the request priority */
659 uint32 start_time; /* Requested start time offset in ms unit */
660 uint32 duration; /* Requested duration in ms unit */
661 uint32 interval; /* Requested periodic interval in ms unit,
662 * 0 means non-periodic
663 */
664 uint32 dur_flex; /* MSCH_REG_DUR_FLEX, min_dur = duration - dur_flex */
665 uint32 min_dur; /* min duration for traffic, maps to home_time */
666 uint32 max_away_dur; /* max acceptable away dur, maps to home_away_time */
667 uint32 hi_prio_time;
668 uint32 hi_prio_interval; /* repeated high priority interval */
669 uint32 chanspec_cnt;
670 uint16 chanspec_list[WL_MSCH_NUMCHANNELS];
671} msch_register_params_t;
672
673#endif /* _EVENT_LOG_PAYLOAD_H_ */