2 * Header file describing the internal (inter-module) DHD interfaces.
4 * Provides type definitions and function prototypes used to link the
5 * DHD OS, bus, and protocol modules.
7 * $Copyright Open Broadcom Corporation$
9 * $Id: dhd_proto.h 390836 2013-03-13 23:43:53Z $
18 #ifndef IOCTL_RESP_TIMEOUT
19 #define IOCTL_RESP_TIMEOUT 2000 /* In milli second default value for Production FW */
20 #endif /* IOCTL_RESP_TIMEOUT */
23 * Exported from the dhd protocol module (dhd_cdc, dhd_rndis)
26 /* Linkage, sets prot link and updates hdrlen in pub */
27 extern int dhd_prot_attach(dhd_pub_t *dhdp);
29 /* Unlink, frees allocated protocol memory (including dhd_prot) */
30 extern void dhd_prot_detach(dhd_pub_t *dhdp);
32 /* Initialize protocol: sync w/dongle state.
33 * Sets dongle media info (iswl, drv_version, mac address).
35 extern int dhd_prot_init(dhd_pub_t *dhdp);
37 /* Stop protocol: sync w/dongle state. */
38 extern void dhd_prot_stop(dhd_pub_t *dhdp);
40 /* Add any protocol-specific data header.
41 * Caller must reserve prot_hdrlen prepend space.
43 extern void dhd_prot_hdrpush(dhd_pub_t *, int ifidx, void *txp);
45 /* Remove any protocol-specific data header. */
46 extern int dhd_prot_hdrpull(dhd_pub_t *, int *ifidx, void *rxp, uchar *buf, uint *len);
48 /* Use protocol to issue ioctl to dongle */
49 extern int dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t * ioc, void * buf, int len);
51 /* Handles a protocol control response asynchronously */
52 extern int dhd_prot_ctl_complete(dhd_pub_t *dhd);
54 /* Check for and handle local prot-specific iovar commands */
55 extern int dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
56 void *params, int plen, void *arg, int len, bool set);
58 /* Add prot dump output to a buffer */
59 extern void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf);
61 /* Update local copy of dongle statistics */
62 extern void dhd_prot_dstats(dhd_pub_t *dhdp);
64 extern int dhd_ioctl(dhd_pub_t * dhd_pub, dhd_ioctl_t *ioc, void * buf, uint buflen);
66 extern int dhd_preinit_ioctls(dhd_pub_t *dhd);
68 extern int dhd_process_pkt_reorder_info(dhd_pub_t *dhd, uchar *reorder_info_buf,
69 uint reorder_info_len, void **pkt, uint32 *free_buf_count);
72 /********************************
73 * For version-string expansion *
76 #define DHD_PROTOCOL "bdc"
78 #define DHD_PROTOCOL "cdc"
80 #define DHD_PROTOCOL "unknown"
83 #endif /* _dhd_proto_h_ */