2 * MSGBUF network driver ioctl/indication encoding
3 * Broadcom 802.11abg Networking Device Driver
5 * Definitions subject to change without notice.
7 * Copyright (C) 1999-2019, Broadcom.
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:
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.
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.
28 * <<Broadcom-WL-IPTag/Open:>>
30 * $Id: bcmmsgbuf.h 739442 2018-01-08 17:45:01Z $
39 #define MSGBUF_MAX_MSG_SIZE ETHER_MAX_LEN
41 #define D2H_EPOCH_MODULO 253 /* sequence number wrap */
42 #define D2H_EPOCH_INIT_VAL (D2H_EPOCH_MODULO + 1)
44 #define H2D_EPOCH_MODULO 253 /* sequence number wrap */
45 #define H2D_EPOCH_INIT_VAL (H2D_EPOCH_MODULO + 1)
47 #define H2DRING_TXPOST_ITEMSIZE 48
48 #define H2DRING_RXPOST_ITEMSIZE 32
49 #define H2DRING_CTRL_SUB_ITEMSIZE 40
51 #define D2HRING_TXCMPLT_ITEMSIZE 24
52 #define D2HRING_RXCMPLT_ITEMSIZE 40
54 #define D2HRING_TXCMPLT_ITEMSIZE_PREREV7 16
55 #define D2HRING_RXCMPLT_ITEMSIZE_PREREV7 32
57 #define D2HRING_CTRL_CMPLT_ITEMSIZE 24
58 #define H2DRING_INFO_BUFPOST_ITEMSIZE H2DRING_CTRL_SUB_ITEMSIZE
59 #define D2HRING_INFO_BUFCMPLT_ITEMSIZE D2HRING_CTRL_CMPLT_ITEMSIZE
61 #define D2HRING_SNAPSHOT_CMPLT_ITEMSIZE 20
63 #define H2DRING_TXPOST_MAX_ITEM 512
64 #define H2DRING_RXPOST_MAX_ITEM 512
65 #define H2DRING_CTRL_SUB_MAX_ITEM 64
66 #define D2HRING_TXCMPLT_MAX_ITEM 1024
67 #define D2HRING_RXCMPLT_MAX_ITEM 512
69 #define H2DRING_DYNAMIC_INFO_MAX_ITEM 32
70 #define D2HRING_DYNAMIC_INFO_MAX_ITEM 32
72 #define D2HRING_CTRL_CMPLT_MAX_ITEM 64
80 HOST_TO_DNGL_TXP_DATA
,
81 HOST_TO_DNGL_RXP_DATA
,
87 #define MESSAGE_PAYLOAD(a) (a & MSG_TYPE_INTERNAL_USE_START) ? TRUE : FALSE
88 #define PCIEDEV_FIRMWARE_TSINFO 0x1
89 #define PCIEDEV_FIRMWARE_TSINFO_FIRST 0x1
90 #define PCIEDEV_FIRMWARE_TSINFO_MIDDLE 0x2
91 #define PCIEDEV_BTLOG_POST 0x3
92 #define PCIEDEV_BT_SNAPSHOT_POST 0x4
96 #define BCMMSGBUF_DUMMY_REF(a, b) do {BCM_REFERENCE((a));BCM_REFERENCE((b));} while (0)
98 #define BCMMSGBUF_API_IFIDX(a) 0
99 #define BCMMSGBUF_API_SEQNUM(a) 0
100 #define BCMMSGBUF_IOCTL_XTID(a) 0
101 #define BCMMSGBUF_IOCTL_PKTID(a) ((a)->cmd_id)
103 #define BCMMSGBUF_SET_API_IFIDX(a, b) BCMMSGBUF_DUMMY_REF(a, b)
104 #define BCMMSGBUF_SET_API_SEQNUM(a, b) BCMMSGBUF_DUMMY_REF(a, b)
105 #define BCMMSGBUF_IOCTL_SET_PKTID(a, b) (BCMMSGBUF_IOCTL_PKTID(a) = (b))
106 #define BCMMSGBUF_IOCTL_SET_XTID(a, b) BCMMSGBUF_DUMMY_REF(a, b)
108 #else /* PCIE_API_REV1 */
110 #define BCMMSGBUF_API_IFIDX(a) ((a)->if_id)
111 #define BCMMSGBUF_IOCTL_PKTID(a) ((a)->pkt_id)
112 #define BCMMSGBUF_API_SEQNUM(a) ((a)->u.seq.seq_no)
113 #define BCMMSGBUF_IOCTL_XTID(a) ((a)->xt_id)
115 #define BCMMSGBUF_SET_API_IFIDX(a, b) (BCMMSGBUF_API_IFIDX((a)) = (b))
116 #define BCMMSGBUF_SET_API_SEQNUM(a, b) (BCMMSGBUF_API_SEQNUM((a)) = (b))
117 #define BCMMSGBUF_IOCTL_SET_PKTID(a, b) (BCMMSGBUF_IOCTL_PKTID((a)) = (b))
118 #define BCMMSGBUF_IOCTL_SET_XTID(a, b) (BCMMSGBUF_IOCTL_XTID((a)) = (b))
120 #endif /* PCIE_API_REV1 */
122 /* utility data structures */
136 typedef union addr64 bcm_addr64_t
;
140 typedef struct cmn_msg_hdr
{
143 /** interface index this is valid for */
147 /** sequence number */
149 /** packet Identifier for the associated host buffer */
154 typedef enum bcmpcie_msgtype
{
155 MSG_TYPE_GEN_STATUS
= 0x1,
156 MSG_TYPE_RING_STATUS
= 0x2,
157 MSG_TYPE_FLOW_RING_CREATE
= 0x3,
158 MSG_TYPE_FLOW_RING_CREATE_CMPLT
= 0x4,
159 /* Enum value as copied from BISON 7.15: new generic message */
160 MSG_TYPE_RING_CREATE_CMPLT
= 0x4,
161 MSG_TYPE_FLOW_RING_DELETE
= 0x5,
162 MSG_TYPE_FLOW_RING_DELETE_CMPLT
= 0x6,
163 /* Enum value as copied from BISON 7.15: new generic message */
164 MSG_TYPE_RING_DELETE_CMPLT
= 0x6,
165 MSG_TYPE_FLOW_RING_FLUSH
= 0x7,
166 MSG_TYPE_FLOW_RING_FLUSH_CMPLT
= 0x8,
167 MSG_TYPE_IOCTLPTR_REQ
= 0x9,
168 MSG_TYPE_IOCTLPTR_REQ_ACK
= 0xA,
169 MSG_TYPE_IOCTLRESP_BUF_POST
= 0xB,
170 MSG_TYPE_IOCTL_CMPLT
= 0xC,
171 MSG_TYPE_EVENT_BUF_POST
= 0xD,
172 MSG_TYPE_WL_EVENT
= 0xE,
173 MSG_TYPE_TX_POST
= 0xF,
174 MSG_TYPE_TX_STATUS
= 0x10,
175 MSG_TYPE_RXBUF_POST
= 0x11,
176 MSG_TYPE_RX_CMPLT
= 0x12,
177 MSG_TYPE_LPBK_DMAXFER
= 0x13,
178 MSG_TYPE_LPBK_DMAXFER_CMPLT
= 0x14,
179 MSG_TYPE_FLOW_RING_RESUME
= 0x15,
180 MSG_TYPE_FLOW_RING_RESUME_CMPLT
= 0x16,
181 MSG_TYPE_FLOW_RING_SUSPEND
= 0x17,
182 MSG_TYPE_FLOW_RING_SUSPEND_CMPLT
= 0x18,
183 MSG_TYPE_INFO_BUF_POST
= 0x19,
184 MSG_TYPE_INFO_BUF_CMPLT
= 0x1A,
185 MSG_TYPE_H2D_RING_CREATE
= 0x1B,
186 MSG_TYPE_D2H_RING_CREATE
= 0x1C,
187 MSG_TYPE_H2D_RING_CREATE_CMPLT
= 0x1D,
188 MSG_TYPE_D2H_RING_CREATE_CMPLT
= 0x1E,
189 MSG_TYPE_H2D_RING_CONFIG
= 0x1F,
190 MSG_TYPE_D2H_RING_CONFIG
= 0x20,
191 MSG_TYPE_H2D_RING_CONFIG_CMPLT
= 0x21,
192 MSG_TYPE_D2H_RING_CONFIG_CMPLT
= 0x22,
193 MSG_TYPE_H2D_MAILBOX_DATA
= 0x23,
194 MSG_TYPE_D2H_MAILBOX_DATA
= 0x24,
195 MSG_TYPE_TIMSTAMP_BUFPOST
= 0x25,
196 MSG_TYPE_HOSTTIMSTAMP
= 0x26,
197 MSG_TYPE_HOSTTIMSTAMP_CMPLT
= 0x27,
198 MSG_TYPE_FIRMWARE_TIMESTAMP
= 0x28,
199 MSG_TYPE_SNAPSHOT_UPLOAD
= 0x29,
200 MSG_TYPE_SNAPSHOT_CMPLT
= 0x2A,
201 MSG_TYPE_H2D_RING_DELETE
= 0x2B,
202 MSG_TYPE_D2H_RING_DELETE
= 0x2C,
203 MSG_TYPE_H2D_RING_DELETE_CMPLT
= 0x2D,
204 MSG_TYPE_D2H_RING_DELETE_CMPLT
= 0x2E,
205 MSG_TYPE_API_MAX_RSVD
= 0x3F
206 } bcmpcie_msg_type_t
;
208 typedef enum bcmpcie_msgtype_int
{
209 MSG_TYPE_INTERNAL_USE_START
= 0x40,
210 MSG_TYPE_EVENT_PYLD
= 0x41,
211 MSG_TYPE_IOCT_PYLD
= 0x42,
212 MSG_TYPE_RX_PYLD
= 0x43,
213 MSG_TYPE_HOST_FETCH
= 0x44,
214 MSG_TYPE_LPBK_DMAXFER_PYLD
= 0x45,
215 MSG_TYPE_TXMETADATA_PYLD
= 0x46,
216 MSG_TYPE_INDX_UPDATE
= 0x47,
217 MSG_TYPE_INFO_PYLD
= 0x48,
218 MSG_TYPE_TS_EVENT_PYLD
= 0x49,
219 MSG_TYPE_PVT_BTLOG_CMPLT
= 0x4A,
220 MSG_TYPE_BTLOG_PYLD
= 0x4B,
221 MSG_TYPE_HMAPTEST_PYLD
= 0x4C,
222 MSG_TYPE_PVT_BT_SNAPSHOT_CMPLT
= 0x4D,
223 MSG_TYPE_BT_SNAPSHOT_PYLD
= 0x4E
224 } bcmpcie_msgtype_int_t
;
226 typedef enum bcmpcie_msgtype_u
{
227 MSG_TYPE_TX_BATCH_POST
= 0x80,
228 MSG_TYPE_IOCTL_REQ
= 0x81,
229 MSG_TYPE_HOST_EVNT
= 0x82, /* console related */
230 MSG_TYPE_LOOPBACK
= 0x83
231 } bcmpcie_msgtype_u_t
;
234 * D2H ring host wakeup soft doorbell, override the PCIE doorbell.
235 * Host configures an <32bit address,value> tuple, and dongle uses SBTOPCIE
236 * Transl0 to write specified value to host address.
238 * Use case: 32bit Address mapped to HW Accelerator Core/Thread Wakeup Register
239 * and value is Core/Thread context. Host will ensure routing the 32bit address
240 * offerred to PCIE to the mapped register.
242 * D2H_RING_CONFIG_SUBTYPE_SOFT_DOORBELL
244 typedef struct bcmpcie_soft_doorbell
{
245 uint32 value
; /* host defined value to be written, eg HW threadid */
246 bcm_addr64_t haddr
; /* host address, eg thread wakeup register address */
247 uint16 items
; /* interrupt coalescing: item count before wakeup */
248 uint16 msecs
; /* interrupt coalescing: timeout in millisecs */
249 } bcmpcie_soft_doorbell_t
;
252 * D2H interrupt using MSI instead of INTX
253 * Host configures MSI vector offset for each D2H interrupt
255 * D2H_RING_CONFIG_SUBTYPE_MSI_DOORBELL
257 typedef enum bcmpcie_msi_intr_idx
{
258 MSI_INTR_IDX_CTRL_CMPL_RING
= 0,
259 MSI_INTR_IDX_TXP_CMPL_RING
= 1,
260 MSI_INTR_IDX_RXP_CMPL_RING
= 2,
261 MSI_INTR_IDX_INFO_CMPL_RING
= 3,
262 MSI_INTR_IDX_MAILBOX
= 4,
264 } bcmpcie_msi_intr_idx_t
;
266 #define BCMPCIE_D2H_MSI_OFFSET_SINGLE 0
267 typedef enum bcmpcie_msi_offset_type
{
268 BCMPCIE_D2H_MSI_OFFSET_MB0
= 2,
269 BCMPCIE_D2H_MSI_OFFSET_MB1
= 3,
270 BCMPCIE_D2H_MSI_OFFSET_DB0
= 4,
271 BCMPCIE_D2H_MSI_OFFSET_DB1
= 5,
272 BCMPCIE_D2H_MSI_OFFSET_H1_DB0
= 6,
273 BCMPCIE_D2H_MSI_OFFSET_MAX
= 7
274 } bcmpcie_msi_offset_type_t
;
276 typedef struct bcmpcie_msi_offset
{
277 uint16 intr_idx
; /* interrupt index */
278 uint16 msi_offset
; /* msi vector offset */
279 } bcmpcie_msi_offset_t
;
281 typedef struct bcmpcie_msi_offset_config
{
283 bcmpcie_msi_offset_t bcmpcie_msi_offset
[MSI_INTR_IDX_MAX
];
284 } bcmpcie_msi_offset_config_t
;
286 #define BCMPCIE_D2H_MSI_OFFSET_DEFAULT BCMPCIE_D2H_MSI_OFFSET_DB1
288 #define BCMPCIE_D2H_MSI_SINGLE 0xFFFE
291 #define BCMPCIE_CMNHDR_IFIDX_PHYINTF_SHFT 5
292 #define BCMPCIE_CMNHDR_IFIDX_PHYINTF_MAX 0x7
293 #define BCMPCIE_CMNHDR_IFIDX_PHYINTF_MASK \
294 (BCMPCIE_CMNHDR_IFIDX_PHYINTF_MAX << BCMPCIE_CMNHDR_IFIDX_PHYINTF_SHFT)
295 #define BCMPCIE_CMNHDR_IFIDX_VIRTINTF_SHFT 0
296 #define BCMPCIE_CMNHDR_IFIDX_VIRTINTF_MAX 0x1F
297 #define BCMPCIE_CMNHDR_IFIDX_VIRTINTF_MASK \
298 (BCMPCIE_CMNHDR_IFIDX_PHYINTF_MAX << BCMPCIE_CMNHDR_IFIDX_PHYINTF_SHFT)
301 #define BCMPCIE_CMNHDR_FLAGS_DMA_R_IDX 0x1
302 #define BCMPCIE_CMNHDR_FLAGS_DMA_R_IDX_INTR 0x2
303 #define BCMPCIE_CMNHDR_FLAGS_TS_SEQNUM_INIT 0x4
304 #define BCMPCIE_CMNHDR_FLAGS_PHASE_BIT 0x80
305 #define BCMPCIE_CMNHDR_PHASE_BIT_INIT 0x80
307 /* IOCTL request message */
308 typedef struct ioctl_req_msg
{
309 /** common message header */
310 cmn_msg_hdr_t cmn_hdr
;
311 /** ioctl command type */
313 /** ioctl transaction ID, to pair with a ioctl response */
315 /** input arguments buffer len */
316 uint16 input_buf_len
;
317 /** expected output len */
318 uint16 output_buf_len
;
319 /** to align the host address on 8 byte boundary */
321 /** always align on 8 byte boundary */
322 bcm_addr64_t host_input_buf_addr
;
327 /** buffer post messages for device to use to return IOCTL responses, Events */
328 typedef struct ioctl_resp_evt_buf_post_msg
{
329 /** common message header */
330 cmn_msg_hdr_t cmn_hdr
;
331 /** length of the host buffer supplied */
333 /** to align the host address on 8 byte boundary */
335 /** always align on 8 byte boundary */
336 bcm_addr64_t host_buf_addr
;
338 } ioctl_resp_evt_buf_post_msg_t
;
340 /* buffer post messages for device to use to return dbg buffers */
341 typedef ioctl_resp_evt_buf_post_msg_t info_buf_post_msg_t
;
343 #define DHD_INFOBUF_RX_BUFPOST_PKTSZ (2 * 1024)
345 #define DHD_BTLOG_RX_BUFPOST_PKTSZ (2 * 1024)
347 /* An infobuf host buffer starts with a 32 bit (LE) version. */
348 #define PCIE_INFOBUF_V1 1
349 /* Infobuf v1 type MSGTRACE's data is exactly the same as the MSGTRACE data that
350 * is wrapped previously/also in a WLC_E_TRACE event. See structure
351 * msgrace_hdr_t in msgtrace.h.
353 #define PCIE_INFOBUF_V1_TYPE_MSGTRACE 1
355 /* Infobuf v1 type LOGTRACE data is exactly the same as the LOGTRACE data that
356 * is wrapped previously/also in a WLC_E_TRACE event. See structure
357 * msgrace_hdr_t in msgtrace.h. (The only difference between a MSGTRACE
358 * and a LOGTRACE is the "trace type" field.)
360 #define PCIE_INFOBUF_V1_TYPE_LOGTRACE 2
362 /* An infobuf version 1 host buffer has a single TLV. The information on the
363 * version 1 types follow this structure definition. (int's LE)
365 typedef struct info_buf_payload_hdr_s
{
368 } info_buf_payload_hdr_t
;
370 /* BT logs/memory to DMA directly from BT memory to host */
371 typedef struct info_buf_btlog_s
{
372 void (*status_cb
)(void *ctx
, void *p
, int error
); /* obsolete - to be removed */
374 dma64addr_t src_addr
;
376 bool (*pcie_status_cb
)(osl_t
*osh
, void *p
, int error
);
381 /** snapshot upload request message */
382 typedef struct snapshot_upload_request_msg
{
383 /** common message header */
384 cmn_msg_hdr_t cmn_hdr
;
385 /** length of the snaphost buffer supplied */
386 uint32 snapshot_buf_len
;
387 /** type of snapshot */
389 /** snapshot param */
390 uint8 snapshot_param
;
391 /** to align the host address on 8 byte boundary */
393 /** always align on 8 byte boundary */
394 bcm_addr64_t host_buf_addr
;
396 } snapshot_upload_request_msg_t
;
398 /** snapshot types */
399 typedef enum bcmpcie_snapshot_type
{
400 SNAPSHOT_TYPE_BT
= 0, /* Bluetooth SRAM and patch RAM */
401 SNAPSHOT_TYPE_WLAN_SOCRAM
= 1, /* WLAN SOCRAM */
402 SNAPSHOT_TYPE_WLAN_HEAP
= 2, /* WLAN HEAP */
403 SNAPSHOT_TYPE_WLAN_REGISTER
= 3 /* WLAN registers */
404 } bcmpcie_snapshot_type_t
;
406 #define PCIE_DMA_XFER_FLG_D11_LPBK_MASK 0xF
407 #define PCIE_DMA_XFER_FLG_D11_LPBK_SHIFT 2
408 #define PCIE_DMA_XFER_FLG_CORE_NUMBER_MASK 3
409 #define PCIE_DMA_XFER_FLG_CORE_NUMBER_SHIFT 0
411 typedef struct pcie_dma_xfer_params
{
412 /** common message header */
413 cmn_msg_hdr_t cmn_hdr
;
415 /** always align on 8 byte boundary */
416 bcm_addr64_t host_input_buf_addr
;
418 /** always align on 8 byte boundary */
419 bcm_addr64_t host_ouput_buf_addr
;
421 /** length of transfer */
423 /** delay before doing the src txfer */
425 /** delay before doing the dest txfer */
428 /* bit0: D11 DMA loopback flag */
430 } pcie_dma_xfer_params_t
;
432 /** Complete msgbuf hdr for flow ring update from host to dongle */
433 typedef struct tx_flowring_create_request
{
435 uint8 da
[ETHER_ADDR_LEN
];
436 uint8 sa
[ETHER_ADDR_LEN
];
441 /* priority_ifrmmask is to define core mask in ifrm mode.
442 * currently it is not used for priority. so uses solely for ifrm mask
444 uint8 priority_ifrmmask
;
448 bcm_addr64_t flow_ring_ptr
;
449 } tx_flowring_create_request_t
;
451 typedef struct tx_flowring_delete_request
{
456 } tx_flowring_delete_request_t
;
458 typedef tx_flowring_delete_request_t d2h_ring_delete_req_t
;
459 typedef tx_flowring_delete_request_t h2d_ring_delete_req_t
;
461 typedef struct tx_flowring_flush_request
{
466 } tx_flowring_flush_request_t
;
468 /** Subtypes for ring_config_req control message */
469 typedef enum ring_config_subtype
{
470 /** Default D2H PCIE doorbell override using ring_config_req msg */
471 D2H_RING_CONFIG_SUBTYPE_SOFT_DOORBELL
= 1, /* Software doorbell */
472 D2H_RING_CONFIG_SUBTYPE_MSI_DOORBELL
= 2 /* MSI configuration */
473 } ring_config_subtype_t
;
475 typedef struct ring_config_req
{
482 /** D2H_RING_CONFIG_SUBTYPE_SOFT_DOORBELL */
483 bcmpcie_soft_doorbell_t soft_doorbell
;
484 /** D2H_RING_CONFIG_SUBTYPE_MSI_DOORBELL */
485 bcmpcie_msi_offset_config_t msi_offset
;
489 /* data structure to use to create on the fly d2h rings */
490 typedef struct d2h_ring_create_req
{
495 bcm_addr64_t ring_ptr
;
499 } d2h_ring_create_req_t
;
501 /* data structure to use to create on the fly h2d rings */
502 #define MAX_COMPLETION_RING_IDS_ASSOCIATED 4
503 typedef struct h2d_ring_create_req
{
507 uint8 n_completion_ids
;
509 bcm_addr64_t ring_ptr
;
512 uint16 completion_ring_ids
[MAX_COMPLETION_RING_IDS_ASSOCIATED
];
514 } h2d_ring_create_req_t
;
516 typedef struct d2h_ring_config_req
{
518 uint16 d2h_ring_config_subtype
;
520 uint32 d2h_ring_config_data
[4];
522 } d2h_ring_config_req_t
;
524 typedef struct h2d_ring_config_req
{
526 uint16 h2d_ring_config_subtype
;
528 uint32 h2d_ring_config_data
;
530 } h2d_ring_config_req_t
;
532 typedef struct h2d_mailbox_data
{
534 uint32 mail_box_data
;
536 } h2d_mailbox_data_t
;
537 typedef struct host_timestamp_msg
{
539 uint16 xt_id
; /* transaction ID */
540 uint16 input_data_len
; /* data len at the host_buf_addr, data in TLVs */
541 uint16 seqnum
; /* number of times host captured the timestamp */
543 /* always align on 8 byte boundary */
544 bcm_addr64_t host_buf_addr
;
547 } host_timestamp_msg_t
;
549 /* buffer post message for timestamp events MSG_TYPE_TIMSTAMP_BUFPOST */
550 typedef ioctl_resp_evt_buf_post_msg_t ts_buf_post_msg_t
;
552 typedef union ctrl_submit_item
{
553 ioctl_req_msg_t ioctl_req
;
554 ioctl_resp_evt_buf_post_msg_t resp_buf_post
;
555 pcie_dma_xfer_params_t dma_xfer
;
556 tx_flowring_create_request_t flow_create
;
557 tx_flowring_delete_request_t flow_delete
;
558 tx_flowring_flush_request_t flow_flush
;
559 ring_config_req_t ring_config_req
;
560 d2h_ring_create_req_t d2h_create
;
561 h2d_ring_create_req_t h2d_create
;
562 d2h_ring_config_req_t d2h_config
;
563 h2d_ring_config_req_t h2d_config
;
564 h2d_mailbox_data_t h2d_mailbox_data
;
565 host_timestamp_msg_t host_ts
;
566 ts_buf_post_msg_t ts_buf_post
;
567 d2h_ring_delete_req_t d2h_delete
;
568 h2d_ring_delete_req_t h2d_delete
;
569 unsigned char check
[H2DRING_CTRL_SUB_ITEMSIZE
];
570 } ctrl_submit_item_t
;
572 typedef struct info_ring_submit_item
{
573 info_buf_post_msg_t info_buf_post
;
574 unsigned char check
[H2DRING_INFO_BUFPOST_ITEMSIZE
];
575 } info_sumbit_item_t
;
577 /** Control Completion messages (20 bytes) */
578 typedef struct compl_msg_hdr
{
579 /** status for the completion */
581 /** submisison flow ring id which generated this status */
588 /** XOR checksum or a magic number to audit DMA done */
589 typedef uint32 dma_done_t
;
591 #define MAX_CLKSRC_ID 0xF
592 #define TX_PKT_RETRY_CNT_0_MASK 0x000000FF
593 #define TX_PKT_RETRY_CNT_0_SHIFT 0
594 #define TX_PKT_RETRY_CNT_1_MASK 0x0000FF00
595 #define TX_PKT_RETRY_CNT_1_SHIFT 8
596 #define TX_PKT_RETRY_CNT_2_MASK 0x00FF0000
597 #define TX_PKT_RETRY_CNT_2_SHIFT 16
598 #define TX_PKT_BAND_INFO 0x0F000000
599 #define TX_PKT_BAND_INFO_SHIFT 24
600 #define TX_PKT_VALID_INFO 0xF0000000
601 #define TX_PKT_VALID_INFO_SHIFT 28
603 typedef struct ts_timestamp_srcid
{
605 uint32 ts_low
; /* time stamp low 32 bits */
606 uint32 rate_spec
; /* use ratespec */
609 uint32 ts_high
; /* time stamp high 28 bits */
611 uint32 ts_high_ext
:28; /* time stamp high 28 bits */
612 uint32 clk_id_ext
:3; /* clock ID source */
613 uint32 phase
:1; /* Phase bit */
614 dma_done_t marker_ext
;
616 uint32 tx_pkt_band_retry_info
;
618 } ts_timestamp_srcid_t
;
620 typedef ts_timestamp_srcid_t ipc_timestamp_t
;
622 typedef struct ts_timestamp
{
627 typedef ts_timestamp_t tick_count_64_t
;
628 typedef ts_timestamp_t ts_timestamp_ns_64_t
;
629 typedef ts_timestamp_t ts_correction_m_t
;
630 typedef ts_timestamp_t ts_correction_b_t
;
632 /* completion header status codes */
633 #define BCMPCIE_SUCCESS 0
634 #define BCMPCIE_NOTFOUND 1
635 #define BCMPCIE_NOMEM 2
636 #define BCMPCIE_BADOPTION 3
637 #define BCMPCIE_RING_IN_USE 4
638 #define BCMPCIE_RING_ID_INVALID 5
639 #define BCMPCIE_PKT_FLUSH 6
640 #define BCMPCIE_NO_EVENT_BUF 7
641 #define BCMPCIE_NO_RX_BUF 8
642 #define BCMPCIE_NO_IOCTLRESP_BUF 9
643 #define BCMPCIE_MAX_IOCTLRESP_BUF 10
644 #define BCMPCIE_MAX_EVENT_BUF 11
645 #define BCMPCIE_BAD_PHASE 12
646 #define BCMPCIE_INVALID_CPL_RINGID 13
647 #define BCMPCIE_RING_TYPE_INVALID 14
648 #define BCMPCIE_NO_TS_EVENT_BUF 15
649 #define BCMPCIE_MAX_TS_EVENT_BUF 16
650 #define BCMPCIE_PCIE_NO_BTLOG_BUF 17
651 #define BCMPCIE_BT_DMA_ERR 18
652 #define BCMPCIE_BT_DMA_DESCR_FETCH_ERR 19
653 #define BCMPCIE_SNAPSHOT_ERR 20
654 #define BCMPCIE_NOT_READY 21
655 #define BCMPCIE_INVALID_DATA 22
656 #define BCMPCIE_NO_RESPONSE 23
657 #define BCMPCIE_NO_CLOCK 24
659 /** IOCTL completion response */
660 typedef struct ioctl_compl_resp_msg
{
661 /** common message header */
662 cmn_msg_hdr_t cmn_hdr
;
663 /** completion message header */
664 compl_msg_hdr_t compl_hdr
;
665 /** response buffer len where a host buffer is involved */
667 /** transaction id to pair with a request */
671 /** XOR checksum or a magic number to audit DMA done */
673 } ioctl_comp_resp_msg_t
;
675 /** IOCTL request acknowledgement */
676 typedef struct ioctl_req_ack_msg
{
677 /** common message header */
678 cmn_msg_hdr_t cmn_hdr
;
679 /** completion message header */
680 compl_msg_hdr_t compl_hdr
;
684 /** XOR checksum or a magic number to audit DMA done */
686 } ioctl_req_ack_msg_t
;
688 /** WL event message: send from device to host */
689 typedef struct wlevent_req_msg
{
690 /** common message header */
691 cmn_msg_hdr_t cmn_hdr
;
692 /** completion message header */
693 compl_msg_hdr_t compl_hdr
;
694 /** event data len valid with the event buffer */
695 uint16 event_data_len
;
696 /** sequence number */
700 /** XOR checksum or a magic number to audit DMA done */
704 /** dma xfer complete message */
705 typedef struct pcie_dmaxfer_cmplt
{
706 /** common message header */
707 cmn_msg_hdr_t cmn_hdr
;
708 /** completion message header */
709 compl_msg_hdr_t compl_hdr
;
711 /** XOR checksum or a magic number to audit DMA done */
713 } pcie_dmaxfer_cmplt_t
;
715 /** general status message */
716 typedef struct pcie_gen_status
{
717 /** common message header */
718 cmn_msg_hdr_t cmn_hdr
;
719 /** completion message header */
720 compl_msg_hdr_t compl_hdr
;
722 /** XOR checksum or a magic number to audit DMA done */
726 /** ring status message */
727 typedef struct pcie_ring_status
{
728 /** common message header */
729 cmn_msg_hdr_t cmn_hdr
;
730 /** completion message header */
731 compl_msg_hdr_t compl_hdr
;
732 /** message which firmware couldn't decode */
735 /** XOR checksum or a magic number to audit DMA done */
737 } pcie_ring_status_t
;
739 typedef struct ring_create_response
{
740 cmn_msg_hdr_t cmn_hdr
;
741 compl_msg_hdr_t cmplt
;
743 /** XOR checksum or a magic number to audit DMA done */
745 } ring_create_response_t
;
747 typedef ring_create_response_t tx_flowring_create_response_t
;
748 typedef ring_create_response_t h2d_ring_create_response_t
;
749 typedef ring_create_response_t d2h_ring_create_response_t
;
751 typedef struct tx_flowring_delete_response
{
753 compl_msg_hdr_t cmplt
;
756 /** XOR checksum or a magic number to audit DMA done */
758 } tx_flowring_delete_response_t
;
760 typedef tx_flowring_delete_response_t h2d_ring_delete_response_t
;
761 typedef tx_flowring_delete_response_t d2h_ring_delete_response_t
;
763 typedef struct tx_flowring_flush_response
{
765 compl_msg_hdr_t cmplt
;
767 /** XOR checksum or a magic number to audit DMA done */
769 } tx_flowring_flush_response_t
;
771 /** Common layout of all d2h control messages */
772 typedef struct ctrl_compl_msg
{
773 /** common message header */
774 cmn_msg_hdr_t cmn_hdr
;
775 /** completion message header */
776 compl_msg_hdr_t compl_hdr
;
778 /** XOR checksum or a magic number to audit DMA done */
782 typedef struct ring_config_resp
{
783 /** common message header */
784 cmn_msg_hdr_t cmn_hdr
;
785 /** completion message header */
786 compl_msg_hdr_t compl_hdr
;
789 /** XOR checksum or a magic number to audit DMA done */
791 } ring_config_resp_t
;
793 typedef struct d2h_mailbox_data
{
795 compl_msg_hdr_t cmplt
;
796 uint32 d2h_mailbox_data
;
798 /* XOR checksum or a magic number to audit DMA done */
800 } d2h_mailbox_data_t
;
802 /* dbg buf completion msg: send from device to host */
803 typedef struct info_buf_resp
{
804 /* common message header */
805 cmn_msg_hdr_t cmn_hdr
;
806 /* completion message header */
807 compl_msg_hdr_t compl_hdr
;
808 /* event data len valid with the event buffer */
809 uint16 info_data_len
;
810 /* sequence number */
814 /* XOR checksum or a magic number to audit DMA done */
818 /* snapshot completion msg: send from device to host */
819 typedef struct snapshot_resp
{
820 /* common message header */
821 cmn_msg_hdr_t cmn_hdr
;
822 /* completion message header */
823 compl_msg_hdr_t compl_hdr
;
824 /* snapshot length uploaded */
830 /* XOR checksum or a magic number to audit DMA done */
834 typedef struct info_ring_cpl_item
{
835 info_buf_resp_t info_buf_post
;
836 unsigned char check
[D2HRING_INFO_BUFCMPLT_ITEMSIZE
];
839 typedef struct host_timestamp_msg_cpl
{
841 compl_msg_hdr_t cmplt
;
842 uint16 xt_id
; /* transaction ID */
845 /* XOR checksum or a magic number to audit DMA done */
847 } host_timestamp_msg_cpl_t
;
849 typedef struct fw_timestamp_event_msg
{
851 compl_msg_hdr_t cmplt
;
852 /* fw captures time stamp info and passed that to host in TLVs */
853 uint16 buf_len
; /* length of the time stamp data copied in host buf */
854 uint16 seqnum
; /* number of times fw captured time stamp */
856 /* XOR checksum or a magic number to audit DMA done */
858 } fw_timestamp_event_msg_t
;
860 typedef union ctrl_completion_item
{
861 ioctl_comp_resp_msg_t ioctl_resp
;
862 wlevent_req_msg_t event
;
863 ioctl_req_ack_msg_t ioct_ack
;
864 pcie_dmaxfer_cmplt_t pcie_xfer_cmplt
;
865 pcie_gen_status_t pcie_gen_status
;
866 pcie_ring_status_t pcie_ring_status
;
867 tx_flowring_create_response_t txfl_create_resp
;
868 tx_flowring_delete_response_t txfl_delete_resp
;
869 tx_flowring_flush_response_t txfl_flush_resp
;
870 ctrl_compl_msg_t ctrl_compl
;
871 ring_config_resp_t ring_config_resp
;
872 d2h_mailbox_data_t d2h_mailbox_data
;
873 info_buf_resp_t dbg_resp
;
874 h2d_ring_create_response_t h2d_ring_create_resp
;
875 d2h_ring_create_response_t d2h_ring_create_resp
;
876 host_timestamp_msg_cpl_t host_ts_cpl
;
877 fw_timestamp_event_msg_t fw_ts_event
;
878 h2d_ring_delete_response_t h2d_ring_delete_resp
;
879 d2h_ring_delete_response_t d2h_ring_delete_resp
;
880 unsigned char ctrl_response
[D2HRING_CTRL_CMPLT_ITEMSIZE
];
881 } ctrl_completion_item_t
;
883 /** H2D Rxpost ring work items */
884 typedef struct host_rxbuf_post
{
885 /** common message header */
886 cmn_msg_hdr_t cmn_hdr
;
887 /** provided meta data buffer len */
888 uint16 metadata_buf_len
;
889 /** provided data buffer len to receive data */
891 /** alignment to make the host buffers start on 8 byte boundary */
893 /** provided meta data buffer */
894 bcm_addr64_t metadata_buf_addr
;
895 /** provided data buffer to receive data */
896 bcm_addr64_t data_buf_addr
;
899 typedef union rxbuf_submit_item
{
900 host_rxbuf_post_t rxpost
;
901 unsigned char check
[H2DRING_RXPOST_ITEMSIZE
];
902 } rxbuf_submit_item_t
;
904 /* D2H Rxcompletion ring work items for IPC rev7 */
905 typedef struct host_rxbuf_cmpl
{
906 /** common message header */
907 cmn_msg_hdr_t cmn_hdr
;
908 /** completion message header */
909 compl_msg_hdr_t compl_hdr
;
910 /** filled up meta data len */
912 /** filled up buffer len to receive data */
914 /** offset in the host rx buffer where the data starts */
916 /** offset in the host rx buffer where the data starts */
921 /** XOR checksum or a magic number to audit DMA done */
922 /* This is for rev6 only. For IPC rev7, this is a reserved field */
928 typedef union rxbuf_complete_item
{
929 host_rxbuf_cmpl_t rxcmpl
;
930 unsigned char check
[D2HRING_RXCMPLT_ITEMSIZE
];
931 } rxbuf_complete_item_t
;
933 typedef struct host_txbuf_post
{
934 /** common message header */
935 cmn_msg_hdr_t cmn_hdr
;
937 uint8 txhdr
[ETHER_HDR_LEN
];
940 /** number of segments */
943 /** provided meta data buffer for txstatus */
944 bcm_addr64_t metadata_buf_addr
;
945 /** provided data buffer to receive data */
946 bcm_addr64_t data_buf_addr
;
947 /** provided meta data buffer len */
948 uint16 metadata_buf_len
;
949 /** provided data buffer len to receive data */
953 /** extended transmit flags */
957 /** user defined rate */
961 /** XOR checksum or a magic number to audit DMA done */
966 #define BCMPCIE_PKT_FLAGS_FRAME_802_3 0x01
967 #define BCMPCIE_PKT_FLAGS_FRAME_802_11 0x02
969 #define BCMPCIE_PKT_FLAGS_FRAME_NORETRY 0x01 /* Disable retry on this frame */
970 #define BCMPCIE_PKT_FLAGS_FRAME_NOAGGR 0x02 /* Disable aggregation for this frame */
971 #define BCMPCIE_PKT_FLAGS_FRAME_UDR 0x04 /* User defined rate for this frame */
972 #define BCMPCIE_PKT_FLAGS_FRAME_ATTR_MASK 0x07 /* Attribute mask */
974 #define BCMPCIE_PKT_FLAGS_FRAME_EXEMPT_MASK 0x03 /* Exempt uses 2 bits */
975 #define BCMPCIE_PKT_FLAGS_FRAME_EXEMPT_SHIFT 0x02 /* needs to be shifted past other bits */
977 #define BCMPCIE_PKT_FLAGS_PRIO_SHIFT 5
978 #define BCMPCIE_PKT_FLAGS_PRIO_MASK (7 << BCMPCIE_PKT_FLAGS_PRIO_SHIFT)
979 #define BCMPCIE_PKT_FLAGS_MONITOR_NO_AMSDU 0x00
980 #define BCMPCIE_PKT_FLAGS_MONITOR_FIRST_PKT 0x01
981 #define BCMPCIE_PKT_FLAGS_MONITOR_INTER_PKT 0x02
982 #define BCMPCIE_PKT_FLAGS_MONITOR_LAST_PKT 0x03
983 #define BCMPCIE_PKT_FLAGS_MONITOR_SHIFT 8
984 #define BCMPCIE_PKT_FLAGS_MONITOR_MASK (3 << BCMPCIE_PKT_FLAGS_MONITOR_SHIFT)
986 /* These are added to fix up compile issues */
987 #define BCMPCIE_TXPOST_FLAGS_FRAME_802_3 BCMPCIE_PKT_FLAGS_FRAME_802_3
988 #define BCMPCIE_TXPOST_FLAGS_FRAME_802_11 BCMPCIE_PKT_FLAGS_FRAME_802_11
989 #define BCMPCIE_TXPOST_FLAGS_PRIO_SHIFT BCMPCIE_PKT_FLAGS_PRIO_SHIFT
990 #define BCMPCIE_TXPOST_FLAGS_PRIO_MASK BCMPCIE_PKT_FLAGS_PRIO_MASK
992 /* H2D Txpost ring work items */
993 typedef union txbuf_submit_item
{
994 host_txbuf_post_t txpost
;
995 unsigned char check
[H2DRING_TXPOST_ITEMSIZE
];
996 } txbuf_submit_item_t
;
998 /* D2H Txcompletion ring work items - extended for IOC rev7 */
999 typedef struct host_txbuf_cmpl
{
1000 /** common message header */
1001 cmn_msg_hdr_t cmn_hdr
;
1002 /** completion message header */
1003 compl_msg_hdr_t compl_hdr
;
1007 /** provided meta data len */
1008 uint16 metadata_len
;
1009 /** provided extended TX status */
1010 uint16 tx_status_ext
;
1012 /** WLAN side txstatus */
1015 /** XOR checksum or a magic number to audit DMA done */
1016 /* This is for rev6 only. For IPC rev7, this is not used */
1022 } host_txbuf_cmpl_t
;
1024 typedef union txbuf_complete_item
{
1025 host_txbuf_cmpl_t txcmpl
;
1026 unsigned char check
[D2HRING_TXCMPLT_ITEMSIZE
];
1027 } txbuf_complete_item_t
;
1029 #define BCMPCIE_D2H_METADATA_HDRLEN 4
1030 #define BCMPCIE_D2H_METADATA_MINLEN (BCMPCIE_D2H_METADATA_HDRLEN + 4)
1032 /** ret buf struct */
1033 typedef struct ret_buf_ptr
{
1038 #ifdef PCIE_API_REV1
1040 /* ioctl specific hdr */
1041 typedef struct ioctl_hdr
{
1047 typedef struct ioctlptr_hdr
{
1055 #else /* PCIE_API_REV1 */
1057 typedef struct ioctl_req_hdr
{
1058 uint32 pkt_id
; /**< Packet ID */
1059 uint32 cmd
; /**< IOCTL ID */
1062 uint16 xt_id
; /**< transaction ID */
1066 #endif /* PCIE_API_REV1 */
1068 /** Complete msgbuf hdr for ioctl from host to dongle */
1069 typedef struct ioct_reqst_hdr
{
1071 #ifdef PCIE_API_REV1
1072 ioctl_hdr_t ioct_hdr
;
1074 ioctl_req_hdr_t ioct_hdr
;
1079 typedef struct ioctptr_reqst_hdr
{
1081 #ifdef PCIE_API_REV1
1082 ioctlptr_hdr_t ioct_hdr
;
1084 ioctl_req_hdr_t ioct_hdr
;
1088 } ioctptr_reqst_hdr_t
;
1090 /** ioctl response header */
1091 typedef struct ioct_resp_hdr
{
1093 #ifdef PCIE_API_REV1
1101 #ifdef PCIE_API_REV1
1103 uint16 xt_id
; /**< transaction ID */
1108 /* ioct resp header used in dongle */
1109 /* ret buf hdr will be stripped off inside dongle itself */
1110 typedef struct msgbuf_ioctl_resp
{
1111 ioct_resp_hdr_t ioct_hdr
;
1112 ret_buf_t ret_buf
; /**< ret buf pointers */
1113 } msgbuf_ioct_resp_t
;
1115 /** WL event hdr info */
1116 typedef struct wl_event_hdr
{
1126 #define TXDESCR_FLOWID_PCIELPBK_1 0xFF
1127 #define TXDESCR_FLOWID_PCIELPBK_2 0xFE
1129 typedef struct txbatch_lenptr_tup
{
1133 ret_buf_t ret_buf
; /**< ret buf pointers */
1134 } txbatch_lenptr_tup_t
;
1136 typedef struct txbatch_cmn_msghdr
{
1142 uint8 txhdr
[ETHER_HDR_LEN
];
1144 } txbatch_cmn_msghdr_t
;
1146 typedef struct txbatch_msghdr
{
1147 txbatch_cmn_msghdr_t txcmn
;
1148 txbatch_lenptr_tup_t tx_tup
[0]; /**< Based on packet count */
1151 /* TX desc posting header */
1152 typedef struct tx_lenptr_tup
{
1155 ret_buf_t ret_buf
; /**< ret buf pointers */
1158 typedef struct txdescr_cmn_msghdr
{
1165 } txdescr_cmn_msghdr_t
;
1167 typedef struct txdescr_msghdr
{
1168 txdescr_cmn_msghdr_t txcmn
;
1169 uint8 txhdr
[ETHER_HDR_LEN
];
1171 tx_lenptr_tup_t tx_tup
[0]; /**< Based on descriptor count */
1174 /** Tx status header info */
1175 typedef struct txstatus_hdr
{
1180 /** RX bufid-len-ptr tuple */
1181 typedef struct rx_lenptr_tup
{
1185 ret_buf_t ret_buf
; /**< ret buf pointers */
1188 /** Rx descr Post hdr info */
1189 typedef struct rxdesc_msghdr
{
1194 rx_lenptr_tup_t rx_tup
[0];
1197 /** RX complete tuples */
1198 typedef struct rxcmplt_tup
{
1206 /** RX complete messge hdr */
1207 typedef struct rxcmplt_hdr
{
1211 rxcmplt_tup_t rx_tup
[0];
1214 typedef struct hostevent_hdr
{
1219 typedef struct dma_xfer_params
{
1220 uint32 src_physaddr_hi
;
1221 uint32 src_physaddr_lo
;
1222 uint32 dest_physaddr_hi
;
1223 uint32 dest_physaddr_lo
;
1227 } dma_xfer_params_t
;
1230 HOST_EVENT_CONS_CMD
= 1
1233 /* defines for flags */
1234 #define MSGBUF_IOC_ACTION_MASK 0x1
1236 #define MAX_SUSPEND_REQ 15
1238 typedef struct tx_idle_flowring_suspend_request
{
1240 uint16 ring_id
[MAX_SUSPEND_REQ
]; /* ring Id's */
1241 uint16 num
; /* number of flowid's to suspend */
1242 } tx_idle_flowring_suspend_request_t
;
1244 typedef struct tx_idle_flowring_suspend_response
{
1246 compl_msg_hdr_t cmplt
;
1249 } tx_idle_flowring_suspend_response_t
;
1251 typedef struct tx_idle_flowring_resume_request
{
1253 uint16 flow_ring_id
;
1256 } tx_idle_flowring_resume_request_t
;
1258 typedef struct tx_idle_flowring_resume_response
{
1260 compl_msg_hdr_t cmplt
;
1263 } tx_idle_flowring_resume_response_t
;
1265 /* timesync related additions */
1267 typedef struct _bcm_xtlv
{
1268 uint16 id
; /* TLV idenitifier */
1269 uint16 len
; /* TLV length in bytes */
1272 #define BCMMSGBUF_FW_CLOCK_INFO_TAG 0
1273 #define BCMMSGBUF_HOST_CLOCK_INFO_TAG 1
1274 #define BCMMSGBUF_HOST_CLOCK_SELECT_TAG 2
1275 #define BCMMSGBUF_D2H_CLOCK_CORRECTION_TAG 3
1276 #define BCMMSGBUF_HOST_TIMESTAMPING_CONFIG_TAG 4
1277 #define BCMMSGBUF_MAX_TSYNC_TAG 5
1279 /* Flags in fw clock info TLV */
1280 #define CAP_DEVICE_TS (1 << 0)
1281 #define CAP_CORRECTED_TS (1 << 1)
1282 #define TS_CLK_ACTIVE (1 << 2)
1284 typedef struct ts_fw_clock_info
{
1285 _bcm_xtlv_t xtlv
; /* BCMMSGBUF_FW_CLOCK_INFO_TAG */
1286 ts_timestamp_srcid_t ts
; /* tick count */
1287 uchar clk_src
[4]; /* clock source acronym ILP/AVB/TSF */
1288 uint32 nominal_clock_freq
;
1292 } ts_fw_clock_info_t
;
1294 typedef struct ts_host_clock_info
{
1295 _bcm_xtlv_t xtlv
; /* BCMMSGBUF_HOST_CLOCK_INFO_TAG */
1296 tick_count_64_t ticks
; /* 64 bit host tick counter */
1297 ts_timestamp_ns_64_t ns
; /* 64 bit host time in nano seconds */
1298 } ts_host_clock_info_t
;
1300 typedef struct ts_host_clock_sel
{
1301 _bcm_xtlv_t xtlv
; /* BCMMSGBUF_HOST_CLOCK_SELECT_TAG */
1302 uint32 seqnum
; /* number of times GPIO time sync toggled */
1303 uint8 min_clk_idx
; /* clock idenitifer configured for packet tiem stamping */
1304 uint8 max_clk_idx
; /* clock idenitifer configured for packet tiem stamping */
1306 } ts_host_clock_sel_t
;
1308 typedef struct ts_d2h_clock_correction
{
1309 _bcm_xtlv_t xtlv
; /* BCMMSGBUF_HOST_CLOCK_INFO_TAG */
1310 uint8 clk_id
; /* clock source in the device */
1312 ts_correction_m_t m
; /* y = 'm' x + b */
1313 ts_correction_b_t b
; /* y = 'm' x + 'c' */
1314 } ts_d2h_clock_correction_t
;
1316 typedef struct ts_host_timestamping_config
{
1317 _bcm_xtlv_t xtlv
; /* BCMMSGBUF_HOST_TIMESTAMPING_CONFIG_TAG */
1318 /* time period to capture the device time stamp and toggle WLAN_TIME_SYNC_GPIO */
1323 } ts_host_timestamping_config_t
;
1325 /* Flags in host timestamping config TLV */
1326 #define FLAG_HOST_RESET (1 << 0)
1327 #define IS_HOST_RESET(x) ((x) & FLAG_HOST_RESET)
1328 #define CLEAR_HOST_RESET(x) ((x) & ~FLAG_HOST_RESET)
1330 #define FLAG_CONFIG_NODROP (1 << 1)
1331 #define IS_CONFIG_NODROP(x) ((x) & FLAG_CONFIG_NODROP)
1332 #define CLEAR_CONFIG_NODROP(x) ((x) & ~FLAG_CONFIG_NODROP)
1334 #endif /* _bcmmsgbuf_h_ */