xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/dhd_proto.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Header file describing the internal (inter-module) DHD interfaces.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Provides type definitions and function prototypes used to link the
5*4882a593Smuzhiyun  * DHD OS, bus, and protocol modules.
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * Copyright (C) 2020, Broadcom.
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  *      Unless you and Broadcom execute a separate written software license
10*4882a593Smuzhiyun  * agreement governing use of this software, this software is licensed to you
11*4882a593Smuzhiyun  * under the terms of the GNU General Public License version 2 (the "GPL"),
12*4882a593Smuzhiyun  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
13*4882a593Smuzhiyun  * following added to such license:
14*4882a593Smuzhiyun  *
15*4882a593Smuzhiyun  *      As a special exception, the copyright holders of this software give you
16*4882a593Smuzhiyun  * permission to link this software with independent modules, and to copy and
17*4882a593Smuzhiyun  * distribute the resulting executable under terms of your choice, provided that
18*4882a593Smuzhiyun  * you also meet, for each linked independent module, the terms and conditions of
19*4882a593Smuzhiyun  * the license of that module.  An independent module is a module which is not
20*4882a593Smuzhiyun  * derived from this software.  The special exception does not apply to any
21*4882a593Smuzhiyun  * modifications of the software.
22*4882a593Smuzhiyun  *
23*4882a593Smuzhiyun  *
24*4882a593Smuzhiyun  * <<Broadcom-WL-IPTag/Open:>>
25*4882a593Smuzhiyun  *
26*4882a593Smuzhiyun  * $Id$
27*4882a593Smuzhiyun  */
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #ifndef _dhd_proto_h_
30*4882a593Smuzhiyun #define _dhd_proto_h_
31*4882a593Smuzhiyun 
32*4882a593Smuzhiyun #include <dhdioctl.h>
33*4882a593Smuzhiyun #include <wlioctl.h>
34*4882a593Smuzhiyun #ifdef BCMPCIE
35*4882a593Smuzhiyun #include <dhd_flowring.h>
36*4882a593Smuzhiyun #endif
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #ifdef BCMINTERNAL
39*4882a593Smuzhiyun #ifdef DHD_FWTRACE
40*4882a593Smuzhiyun #include <bcm_fwtrace.h>
41*4882a593Smuzhiyun #endif /* DHD_FWTRACE */
42*4882a593Smuzhiyun #endif /* BCMINTERNAL */
43*4882a593Smuzhiyun 
44*4882a593Smuzhiyun #define DEFAULT_IOCTL_RESP_TIMEOUT	(5 * 1000) /* 5 seconds */
45*4882a593Smuzhiyun #ifndef IOCTL_RESP_TIMEOUT
46*4882a593Smuzhiyun #if defined(BCMQT_HW)
47*4882a593Smuzhiyun #define IOCTL_RESP_TIMEOUT  (600 * 1000) /* 600 sec in real time */
48*4882a593Smuzhiyun #elif defined(BCMFPGA_HW)
49*4882a593Smuzhiyun #define IOCTL_RESP_TIMEOUT  (60 * 1000) /* 60 sec in real time */
50*4882a593Smuzhiyun #else
51*4882a593Smuzhiyun /* In milli second default value for Production FW */
52*4882a593Smuzhiyun #define IOCTL_RESP_TIMEOUT  DEFAULT_IOCTL_RESP_TIMEOUT
53*4882a593Smuzhiyun #endif /* BCMQT */
54*4882a593Smuzhiyun #endif /* IOCTL_RESP_TIMEOUT */
55*4882a593Smuzhiyun 
56*4882a593Smuzhiyun #if defined(BCMQT_HW)
57*4882a593Smuzhiyun #define IOCTL_DMAXFER_TIMEOUT  (260 * 1000) /* 260 seconds second */
58*4882a593Smuzhiyun #elif defined(BCMFPGA_HW)
59*4882a593Smuzhiyun #define IOCTL_DMAXFER_TIMEOUT  (120 * 1000) /* 120 seconds */
60*4882a593Smuzhiyun #else
61*4882a593Smuzhiyun /* In milli second default value for Production FW */
62*4882a593Smuzhiyun #define IOCTL_DMAXFER_TIMEOUT  (15 * 1000) /* 15 seconds for Production FW */
63*4882a593Smuzhiyun #endif /* BCMQT */
64*4882a593Smuzhiyun 
65*4882a593Smuzhiyun #ifndef MFG_IOCTL_RESP_TIMEOUT
66*4882a593Smuzhiyun #define MFG_IOCTL_RESP_TIMEOUT  20000  /* In milli second default value for MFG FW */
67*4882a593Smuzhiyun #endif /* MFG_IOCTL_RESP_TIMEOUT */
68*4882a593Smuzhiyun 
69*4882a593Smuzhiyun #define DEFAULT_D3_ACK_RESP_TIMEOUT	2000
70*4882a593Smuzhiyun #ifndef D3_ACK_RESP_TIMEOUT
71*4882a593Smuzhiyun #define D3_ACK_RESP_TIMEOUT		DEFAULT_D3_ACK_RESP_TIMEOUT
72*4882a593Smuzhiyun #endif /* D3_ACK_RESP_TIMEOUT */
73*4882a593Smuzhiyun 
74*4882a593Smuzhiyun #define DEFAULT_DHD_BUS_BUSY_TIMEOUT	(IOCTL_RESP_TIMEOUT + 1000)
75*4882a593Smuzhiyun #ifndef DHD_BUS_BUSY_TIMEOUT
76*4882a593Smuzhiyun #define DHD_BUS_BUSY_TIMEOUT	DEFAULT_DHD_BUS_BUSY_TIMEOUT
77*4882a593Smuzhiyun #endif /* DEFAULT_DHD_BUS_BUSY_TIMEOUT */
78*4882a593Smuzhiyun 
79*4882a593Smuzhiyun #define DS_EXIT_TIMEOUT	1000 /* In ms */
80*4882a593Smuzhiyun #define DS_ENTER_TIMEOUT 1000 /* In ms */
81*4882a593Smuzhiyun 
82*4882a593Smuzhiyun #define IOCTL_DISABLE_TIMEOUT 0
83*4882a593Smuzhiyun 
84*4882a593Smuzhiyun /*
85*4882a593Smuzhiyun  * Exported from the dhd protocol module (dhd_cdc, dhd_rndis)
86*4882a593Smuzhiyun  */
87*4882a593Smuzhiyun 
88*4882a593Smuzhiyun /* Linkage, sets prot link and updates hdrlen in pub */
89*4882a593Smuzhiyun extern int dhd_prot_attach(dhd_pub_t *dhdp);
90*4882a593Smuzhiyun 
91*4882a593Smuzhiyun /* Initilizes the index block for dma'ing indices */
92*4882a593Smuzhiyun extern int dhd_prot_dma_indx_init(dhd_pub_t *dhdp, uint32 rw_index_sz,
93*4882a593Smuzhiyun 	uint8 type, uint32 length);
94*4882a593Smuzhiyun #ifdef DHD_DMA_INDICES_SEQNUM
95*4882a593Smuzhiyun extern int dhd_prot_dma_indx_copybuf_init(dhd_pub_t *dhd, uint32 buf_sz,
96*4882a593Smuzhiyun 	uint8 type);
97*4882a593Smuzhiyun extern uint32 dhd_prot_read_seqnum(dhd_pub_t *dhd, bool host);
98*4882a593Smuzhiyun extern void dhd_prot_write_host_seqnum(dhd_pub_t *dhd, uint32 seq_num);
99*4882a593Smuzhiyun extern void dhd_prot_save_dmaidx(dhd_pub_t *dhd);
100*4882a593Smuzhiyun #endif /* DHD_DMA_INDICES_SEQNUM */
101*4882a593Smuzhiyun /* Unlink, frees allocated protocol memory (including dhd_prot) */
102*4882a593Smuzhiyun extern void dhd_prot_detach(dhd_pub_t *dhdp);
103*4882a593Smuzhiyun 
104*4882a593Smuzhiyun /* Initialize protocol: sync w/dongle state.
105*4882a593Smuzhiyun  * Sets dongle media info (iswl, drv_version, mac address).
106*4882a593Smuzhiyun  */
107*4882a593Smuzhiyun extern int dhd_sync_with_dongle(dhd_pub_t *dhdp);
108*4882a593Smuzhiyun 
109*4882a593Smuzhiyun /* Protocol initialization needed for IOCTL/IOVAR path */
110*4882a593Smuzhiyun extern int dhd_prot_init(dhd_pub_t *dhd);
111*4882a593Smuzhiyun 
112*4882a593Smuzhiyun /* Stop protocol: sync w/dongle state. */
113*4882a593Smuzhiyun extern void dhd_prot_stop(dhd_pub_t *dhdp);
114*4882a593Smuzhiyun 
115*4882a593Smuzhiyun /* Add any protocol-specific data header.
116*4882a593Smuzhiyun  * Caller must reserve prot_hdrlen prepend space.
117*4882a593Smuzhiyun  */
118*4882a593Smuzhiyun extern void dhd_prot_hdrpush(dhd_pub_t *, int ifidx, void *txp);
119*4882a593Smuzhiyun extern uint dhd_prot_hdrlen(dhd_pub_t *, void *txp);
120*4882a593Smuzhiyun 
121*4882a593Smuzhiyun /* Remove any protocol-specific data header. */
122*4882a593Smuzhiyun extern int dhd_prot_hdrpull(dhd_pub_t *, int *ifidx, void *rxp, uchar *buf, uint *len);
123*4882a593Smuzhiyun 
124*4882a593Smuzhiyun #ifdef DHD_LOSSLESS_ROAMING
125*4882a593Smuzhiyun extern int dhd_update_sdio_data_prio_map(dhd_pub_t *dhdp);
126*4882a593Smuzhiyun #endif // DHD_LOSSLESS_ROAMING
127*4882a593Smuzhiyun 
128*4882a593Smuzhiyun /* Use protocol to issue ioctl to dongle */
129*4882a593Smuzhiyun extern int dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t * ioc, void * buf, int len);
130*4882a593Smuzhiyun 
131*4882a593Smuzhiyun /* Handles a protocol control response asynchronously */
132*4882a593Smuzhiyun extern int dhd_prot_ctl_complete(dhd_pub_t *dhd);
133*4882a593Smuzhiyun 
134*4882a593Smuzhiyun /* Check for and handle local prot-specific iovar commands */
135*4882a593Smuzhiyun extern int dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
136*4882a593Smuzhiyun                              void *params, int plen, void *arg, int len, bool set);
137*4882a593Smuzhiyun 
138*4882a593Smuzhiyun /* Add prot dump output to a buffer */
139*4882a593Smuzhiyun extern void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf);
140*4882a593Smuzhiyun 
141*4882a593Smuzhiyun /* Dump extended trap data */
142*4882a593Smuzhiyun extern int dhd_prot_dump_extended_trap(dhd_pub_t *dhdp, struct bcmstrbuf *b, bool raw);
143*4882a593Smuzhiyun 
144*4882a593Smuzhiyun /* Update local copy of dongle statistics */
145*4882a593Smuzhiyun extern void dhd_prot_dstats(dhd_pub_t *dhdp);
146*4882a593Smuzhiyun 
147*4882a593Smuzhiyun extern int dhd_ioctl(dhd_pub_t * dhd_pub, dhd_ioctl_t *ioc, void * buf, uint buflen);
148*4882a593Smuzhiyun 
149*4882a593Smuzhiyun extern int dhd_preinit_ioctls(dhd_pub_t *dhd);
150*4882a593Smuzhiyun 
151*4882a593Smuzhiyun extern int dhd_process_pkt_reorder_info(dhd_pub_t *dhd, uchar *reorder_info_buf,
152*4882a593Smuzhiyun 	uint reorder_info_len, void **pkt, uint32 *free_buf_count);
153*4882a593Smuzhiyun 
154*4882a593Smuzhiyun #ifdef BCMPCIE
155*4882a593Smuzhiyun extern bool dhd_prot_process_msgbuf_txcpl(dhd_pub_t *dhd, uint bound, int ringtype);
156*4882a593Smuzhiyun extern bool dhd_prot_process_msgbuf_rxcpl(dhd_pub_t *dhd, uint bound, int ringtype);
157*4882a593Smuzhiyun extern bool dhd_prot_process_msgbuf_infocpl(dhd_pub_t *dhd, uint bound);
158*4882a593Smuzhiyun #ifdef BTLOG
159*4882a593Smuzhiyun extern bool dhd_prot_process_msgbuf_btlogcpl(dhd_pub_t *dhd, uint bound);
160*4882a593Smuzhiyun #endif	/* BTLOG */
161*4882a593Smuzhiyun extern int dhd_prot_process_ctrlbuf(dhd_pub_t * dhd);
162*4882a593Smuzhiyun extern int dhd_prot_process_trapbuf(dhd_pub_t * dhd);
163*4882a593Smuzhiyun extern bool dhd_prot_dtohsplit(dhd_pub_t * dhd);
164*4882a593Smuzhiyun extern int dhd_post_dummy_msg(dhd_pub_t *dhd);
165*4882a593Smuzhiyun extern int dhdmsgbuf_lpbk_req(dhd_pub_t *dhd, uint len);
166*4882a593Smuzhiyun extern void dhd_prot_rx_dataoffset(dhd_pub_t *dhd, uint32 offset);
167*4882a593Smuzhiyun extern int dhd_prot_txdata(dhd_pub_t *dhd, void *p, uint8 ifidx);
168*4882a593Smuzhiyun extern void dhd_prot_schedule_aggregate_h2d_db(dhd_pub_t *dhd, uint16 flow_id);
169*4882a593Smuzhiyun extern int dhdmsgbuf_dmaxfer_req(dhd_pub_t *dhd,
170*4882a593Smuzhiyun 	uint len, uint srcdelay, uint destdelay, uint d11_lpbk, uint core_num,
171*4882a593Smuzhiyun 	uint32 mem_addr);
172*4882a593Smuzhiyun extern int dhdmsgbuf_dmaxfer_status(dhd_pub_t *dhd, dma_xfer_info_t *result);
173*4882a593Smuzhiyun 
174*4882a593Smuzhiyun extern void dhd_dma_buf_init(dhd_pub_t *dhd, void *dma_buf,
175*4882a593Smuzhiyun 	void *va, uint32 len, dmaaddr_t pa, void *dmah, void *secdma);
176*4882a593Smuzhiyun extern void dhd_prot_flowrings_pool_release(dhd_pub_t *dhd,
177*4882a593Smuzhiyun 	uint16 flowid, void *msgbuf_ring);
178*4882a593Smuzhiyun extern int dhd_prot_flow_ring_create(dhd_pub_t *dhd, flow_ring_node_t *flow_ring_node);
179*4882a593Smuzhiyun extern int dhd_post_tx_ring_item(dhd_pub_t *dhd, void *PKTBUF, uint8 ifindex);
180*4882a593Smuzhiyun extern int dhd_prot_flow_ring_delete(dhd_pub_t *dhd, flow_ring_node_t *flow_ring_node);
181*4882a593Smuzhiyun extern int dhd_prot_flow_ring_flush(dhd_pub_t *dhd, flow_ring_node_t *flow_ring_node);
182*4882a593Smuzhiyun extern int dhd_prot_ringupd_dump(dhd_pub_t *dhd, struct bcmstrbuf *b);
183*4882a593Smuzhiyun extern uint32 dhd_prot_metadata_dbg_set(dhd_pub_t *dhd, bool val);
184*4882a593Smuzhiyun extern uint32 dhd_prot_metadata_dbg_get(dhd_pub_t *dhd);
185*4882a593Smuzhiyun extern uint32 dhd_prot_metadatalen_set(dhd_pub_t *dhd, uint32 val, bool rx);
186*4882a593Smuzhiyun extern uint32 dhd_prot_metadatalen_get(dhd_pub_t *dhd, bool rx);
187*4882a593Smuzhiyun extern void dhd_prot_print_flow_ring(dhd_pub_t *dhd, void *msgbuf_flow_info, bool h2d,
188*4882a593Smuzhiyun 	struct bcmstrbuf *strbuf, const char * fmt);
189*4882a593Smuzhiyun extern void dhd_prot_print_info(dhd_pub_t *dhd, struct bcmstrbuf *strbuf);
190*4882a593Smuzhiyun extern void dhd_prot_update_txflowring(dhd_pub_t *dhdp, uint16 flow_id, void *msgring_info);
191*4882a593Smuzhiyun extern void dhd_prot_txdata_write_flush(dhd_pub_t *dhd, uint16 flow_id);
192*4882a593Smuzhiyun extern uint32 dhd_prot_txp_threshold(dhd_pub_t *dhd, bool set, uint32 val);
193*4882a593Smuzhiyun extern void dhd_prot_reset(dhd_pub_t *dhd);
194*4882a593Smuzhiyun extern uint16 dhd_get_max_flow_rings(dhd_pub_t *dhd);
195*4882a593Smuzhiyun 
196*4882a593Smuzhiyun #ifdef IDLE_TX_FLOW_MGMT
197*4882a593Smuzhiyun extern int dhd_prot_flow_ring_batch_suspend_request(dhd_pub_t *dhd, uint16 *ringid, uint16 count);
198*4882a593Smuzhiyun extern int dhd_prot_flow_ring_resume(dhd_pub_t *dhd, flow_ring_node_t *flow_ring_node);
199*4882a593Smuzhiyun #endif /* IDLE_TX_FLOW_MGMT */
200*4882a593Smuzhiyun extern int dhd_prot_init_info_rings(dhd_pub_t *dhd);
201*4882a593Smuzhiyun #ifdef BTLOG
202*4882a593Smuzhiyun extern int dhd_prot_init_btlog_rings(dhd_pub_t *dhd);
203*4882a593Smuzhiyun #endif	/* BTLOG */
204*4882a593Smuzhiyun #ifdef DHD_HP2P
205*4882a593Smuzhiyun extern int dhd_prot_init_hp2p_rings(dhd_pub_t *dhd);
206*4882a593Smuzhiyun #endif /* DHD_HP2P */
207*4882a593Smuzhiyun extern int dhd_prot_check_tx_resource(dhd_pub_t *dhd);
208*4882a593Smuzhiyun #endif /* BCMPCIE */
209*4882a593Smuzhiyun 
210*4882a593Smuzhiyun #ifdef DHD_LB
211*4882a593Smuzhiyun extern void dhd_lb_tx_compl_handler(unsigned long data);
212*4882a593Smuzhiyun extern void dhd_lb_rx_compl_handler(unsigned long data);
213*4882a593Smuzhiyun extern void dhd_lb_rx_process_handler(unsigned long data);
214*4882a593Smuzhiyun #endif /* DHD_LB */
215*4882a593Smuzhiyun extern int dhd_prot_h2d_mbdata_send_ctrlmsg(dhd_pub_t *dhd, uint32 mb_data);
216*4882a593Smuzhiyun 
217*4882a593Smuzhiyun #ifdef BCMPCIE
218*4882a593Smuzhiyun extern int dhd_prot_send_host_timestamp(dhd_pub_t *dhdp, uchar *tlv, uint16 tlv_len,
219*4882a593Smuzhiyun 	uint16 seq, uint16 xt_id);
220*4882a593Smuzhiyun extern bool dhd_prot_data_path_tx_timestamp_logging(dhd_pub_t *dhd,  bool enable, bool set);
221*4882a593Smuzhiyun extern bool dhd_prot_data_path_rx_timestamp_logging(dhd_pub_t *dhd,  bool enable, bool set);
222*4882a593Smuzhiyun extern bool dhd_prot_pkt_noretry(dhd_pub_t *dhd, bool enable, bool set);
223*4882a593Smuzhiyun extern bool dhd_prot_pkt_noaggr(dhd_pub_t *dhd, bool enable, bool set);
224*4882a593Smuzhiyun extern bool dhd_prot_pkt_fixed_rate(dhd_pub_t *dhd, bool enable, bool set);
225*4882a593Smuzhiyun #else /* BCMPCIE */
226*4882a593Smuzhiyun #define dhd_prot_send_host_timestamp(a, b, c, d, e)		0
227*4882a593Smuzhiyun #define dhd_prot_data_path_tx_timestamp_logging(a, b, c)	0
228*4882a593Smuzhiyun #define dhd_prot_data_path_rx_timestamp_logging(a, b, c)	0
229*4882a593Smuzhiyun #endif /* BCMPCIE */
230*4882a593Smuzhiyun 
231*4882a593Smuzhiyun extern void dhd_prot_dma_indx_free(dhd_pub_t *dhd);
232*4882a593Smuzhiyun 
233*4882a593Smuzhiyun #ifdef SNAPSHOT_UPLOAD
234*4882a593Smuzhiyun /* send request to take snapshot */
235*4882a593Smuzhiyun int dhd_prot_send_snapshot_request(dhd_pub_t *dhdp, uint8 snapshot_type, uint8 snapshot_param);
236*4882a593Smuzhiyun /* get uploaded snapshot */
237*4882a593Smuzhiyun int dhd_prot_get_snapshot(dhd_pub_t *dhdp, uint8 snapshot_type, uint32 offset,
238*4882a593Smuzhiyun 	uint32 dst_buf_size, uint8 *dst_buf, uint32 *dst_size, bool *is_more);
239*4882a593Smuzhiyun #endif	/* SNAPSHOT_UPLOAD */
240*4882a593Smuzhiyun 
241*4882a593Smuzhiyun #ifdef EWP_EDL
242*4882a593Smuzhiyun int dhd_prot_init_edl_rings(dhd_pub_t *dhd);
243*4882a593Smuzhiyun bool dhd_prot_process_msgbuf_edl(dhd_pub_t *dhd);
244*4882a593Smuzhiyun int dhd_prot_process_edl_complete(dhd_pub_t *dhd, void *evt_decode_data);
245*4882a593Smuzhiyun #endif /* EWP_EDL  */
246*4882a593Smuzhiyun 
247*4882a593Smuzhiyun /* APIs for managing a DMA-able buffer */
248*4882a593Smuzhiyun int  dhd_dma_buf_alloc(dhd_pub_t *dhd, dhd_dma_buf_t *dma_buf, uint32 buf_len);
249*4882a593Smuzhiyun void dhd_dma_buf_free(dhd_pub_t *dhd, dhd_dma_buf_t *dma_buf);
250*4882a593Smuzhiyun void dhd_local_buf_reset(char *buf, uint32 len);
251*4882a593Smuzhiyun 
252*4882a593Smuzhiyun /********************************
253*4882a593Smuzhiyun  * For version-string expansion *
254*4882a593Smuzhiyun  */
255*4882a593Smuzhiyun #if defined(BDC)
256*4882a593Smuzhiyun #define DHD_PROTOCOL "bdc"
257*4882a593Smuzhiyun #elif defined(CDC)
258*4882a593Smuzhiyun #define DHD_PROTOCOL "cdc"
259*4882a593Smuzhiyun #else
260*4882a593Smuzhiyun #define DHD_PROTOCOL "unknown"
261*4882a593Smuzhiyun #endif /* proto */
262*4882a593Smuzhiyun 
263*4882a593Smuzhiyun int dhd_get_hscb_info(dhd_pub_t *dhd, void ** va, uint32 *len);
264*4882a593Smuzhiyun int dhd_get_hscb_buff(dhd_pub_t *dhd, uint32 offset, uint32 length, void * buff);
265*4882a593Smuzhiyun 
266*4882a593Smuzhiyun #ifdef BCMINTERNAL
267*4882a593Smuzhiyun typedef struct host_page_location_info {
268*4882a593Smuzhiyun 	uint32 addr_lo;
269*4882a593Smuzhiyun 	uint32 addr_hi;
270*4882a593Smuzhiyun 	uint32 binary_size;
271*4882a593Smuzhiyun 	uint32 tlv_size;
272*4882a593Smuzhiyun 	uint32 tlv_signature;
273*4882a593Smuzhiyun } host_page_location_info_t;
274*4882a593Smuzhiyun #define BCM_HOST_PAGE_LOCATION_SIGNATURE	0xFEED10C5u
275*4882a593Smuzhiyun 
276*4882a593Smuzhiyun #ifdef DHD_FWTRACE
277*4882a593Smuzhiyun typedef struct host_fwtrace_buf_location_info {
278*4882a593Smuzhiyun 	fwtrace_hostaddr_info_t host_buf_info;
279*4882a593Smuzhiyun 	uint32 tlv_size;
280*4882a593Smuzhiyun 	uint32 tlv_signature;
281*4882a593Smuzhiyun } host_fwtrace_buf_location_info_t;
282*4882a593Smuzhiyun /* Host buffer info for pushing the trace info */
283*4882a593Smuzhiyun #define BCM_HOST_FWTRACE_BUF_LOCATION_SIGNATURE	0xFEED10C6u
284*4882a593Smuzhiyun #endif /* DHD_FWTRACE */
285*4882a593Smuzhiyun #endif /* BCMINTERNAL */
286*4882a593Smuzhiyun 
287*4882a593Smuzhiyun #ifdef DHD_HP2P
288*4882a593Smuzhiyun extern uint8 dhd_prot_hp2p_enable(dhd_pub_t *dhd, bool set, int enable);
289*4882a593Smuzhiyun extern uint32 dhd_prot_pkt_threshold(dhd_pub_t *dhd, bool set, uint32 val);
290*4882a593Smuzhiyun extern uint32 dhd_prot_time_threshold(dhd_pub_t *dhd, bool set, uint32 val);
291*4882a593Smuzhiyun extern uint32 dhd_prot_pkt_expiry(dhd_pub_t *dhd, bool set, uint32 val);
292*4882a593Smuzhiyun #endif
293*4882a593Smuzhiyun 
294*4882a593Smuzhiyun #ifdef DHD_MAP_LOGGING
295*4882a593Smuzhiyun extern void dhd_prot_smmu_fault_dump(dhd_pub_t *dhdp);
296*4882a593Smuzhiyun #endif /* DHD_MAP_LOGGING */
297*4882a593Smuzhiyun 
298*4882a593Smuzhiyun extern uint16 dhd_prot_get_h2d_max_txpost(dhd_pub_t *dhd);
299*4882a593Smuzhiyun extern void dhd_prot_set_h2d_max_txpost(dhd_pub_t *dhd, uint16 max_txpost);
300*4882a593Smuzhiyun 
301*4882a593Smuzhiyun #if defined(DHD_HTPUT_TUNABLES)
302*4882a593Smuzhiyun extern uint16 dhd_prot_get_h2d_htput_max_txpost(dhd_pub_t *dhd);
303*4882a593Smuzhiyun extern void dhd_prot_set_h2d_htput_max_txpost(dhd_pub_t *dhd, uint16 max_txpost);
304*4882a593Smuzhiyun #endif /* DHD_HTPUT_TUNABLES */
305*4882a593Smuzhiyun 
306*4882a593Smuzhiyun #endif /* _dhd_proto_h_ */
307