aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm4329/dhd_proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcm4329/dhd_proto.h')
-rw-r--r--drivers/net/wireless/bcm4329/dhd_proto.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_proto.h b/drivers/net/wireless/bcm4329/dhd_proto.h
new file mode 100644
index 00000000000..7ef6929a5bf
--- /dev/null
+++ b/drivers/net/wireless/bcm4329/dhd_proto.h
@@ -0,0 +1,102 @@
1/*
2 * Header file describing the internal (inter-module) DHD interfaces.
3 *
4 * Provides type definitions and function prototypes used to link the
5 * DHD OS, bus, and protocol modules.
6 *
7 * Copyright (C) 1999-2010, Broadcom Corporation
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 * $Id: dhd_proto.h,v 1.2.82.1.4.1.16.7 2010/05/10 12:54:59 Exp $
28 */
29
30#ifndef _dhd_proto_h_
31#define _dhd_proto_h_
32
33#include <dhdioctl.h>
34#include <wlioctl.h>
35
36#ifndef IOCTL_RESP_TIMEOUT
37#define IOCTL_RESP_TIMEOUT 3000 /* In milli second */
38#endif
39
40#ifndef IOCTL_CHIP_ACTIVE_TIMEOUT
41#define IOCTL_CHIP_ACTIVE_TIMEOUT 10 /* In milli second */
42#endif
43
44/*
45 * Exported from the dhd protocol module (dhd_cdc, dhd_rndis)
46 */
47
48/* Linkage, sets prot link and updates hdrlen in pub */
49extern int dhd_prot_attach(dhd_pub_t *dhdp);
50
51/* Unlink, frees allocated protocol memory (including dhd_prot) */
52extern void dhd_prot_detach(dhd_pub_t *dhdp);
53
54/* Initialize protocol: sync w/dongle state.
55 * Sets dongle media info (iswl, drv_version, mac address).
56 */
57extern int dhd_prot_init(dhd_pub_t *dhdp);
58
59/* Stop protocol: sync w/dongle state. */
60extern void dhd_prot_stop(dhd_pub_t *dhdp);
61
62extern bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, uint8 *fcbits);
63
64/* Add any protocol-specific data header.
65 * Caller must reserve prot_hdrlen prepend space.
66 */
67extern void dhd_prot_hdrpush(dhd_pub_t *, int ifidx, void *txp);
68
69/* Remove any protocol-specific data header. */
70extern int dhd_prot_hdrpull(dhd_pub_t *, int *ifidx, void *rxp);
71
72/* Use protocol to issue ioctl to dongle */
73extern int dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t * ioc, void * buf, int len);
74
75/* Check for and handle local prot-specific iovar commands */
76extern int dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
77 void *params, int plen, void *arg, int len, bool set);
78
79/* Add prot dump output to a buffer */
80extern void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf);
81
82/* Update local copy of dongle statistics */
83extern void dhd_prot_dstats(dhd_pub_t *dhdp);
84
85extern int dhd_ioctl(dhd_pub_t * dhd_pub, dhd_ioctl_t *ioc, void * buf, uint buflen);
86
87extern int dhd_preinit_ioctls(dhd_pub_t *dhd);
88
89/********************************
90 * For version-string expansion *
91 */
92#if defined(BDC)
93#define DHD_PROTOCOL "bdc"
94#elif defined(CDC)
95#define DHD_PROTOCOL "cdc"
96#elif defined(RNDIS)
97#define DHD_PROTOCOL "rndis"
98#else
99#define DHD_PROTOCOL "unknown"
100#endif /* proto */
101
102#endif /* _dhd_proto_h_ */