aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcmdhd/dhd_bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcmdhd/dhd_bus.h')
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_bus.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_bus.h b/drivers/net/wireless/bcmdhd/dhd_bus.h
new file mode 100644
index 00000000000..bccb8b6603f
--- /dev/null
+++ b/drivers/net/wireless/bcmdhd/dhd_bus.h
@@ -0,0 +1,99 @@
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-2011, 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_bus.h,v 1.14.28.1 2010-12-23 01:13:17 Exp $
28 */
29
30#ifndef _dhd_bus_h_
31#define _dhd_bus_h_
32
33/*
34 * Exported from dhd bus module (dhd_usb, dhd_sdio)
35 */
36
37/* Indicate (dis)interest in finding dongles. */
38extern int dhd_bus_register(void);
39extern void dhd_bus_unregister(void);
40
41/* Download firmware image and nvram image */
42extern bool dhd_bus_download_firmware(struct dhd_bus *bus, osl_t *osh,
43 char *fw_path, char *nv_path);
44
45/* Stop bus module: clear pending frames, disable data flow */
46extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
47
48/* Initialize bus module: prepare for communication w/dongle */
49extern int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex);
50
51/* Get the Bus Idle Time */
52extern void dhd_bus_getidletime(dhd_pub_t *dhdp, int *idletime);
53
54/* Set the Bus Idle Time*/
55extern void dhd_bus_setidletime(dhd_pub_t *dhdp, int idle_time);
56/* Send a data frame to the dongle. Callee disposes of txp. */
57extern int dhd_bus_txdata(struct dhd_bus *bus, void *txp);
58
59/* Send/receive a control message to/from the dongle.
60 * Expects caller to enforce a single outstanding transaction.
61 */
62extern int dhd_bus_txctl(struct dhd_bus *bus, uchar *msg, uint msglen);
63extern int dhd_bus_rxctl(struct dhd_bus *bus, uchar *msg, uint msglen);
64
65/* Watchdog timer function */
66extern bool dhd_bus_watchdog(dhd_pub_t *dhd);
67extern void dhd_disable_intr(dhd_pub_t *dhd);
68
69#if defined(DHD_DEBUG)
70/* Device console input function */
71extern int dhd_bus_console_in(dhd_pub_t *dhd, uchar *msg, uint msglen);
72#endif /* defined(DHD_DEBUG) */
73
74/* Deferred processing for the bus, return TRUE requests reschedule */
75extern bool dhd_bus_dpc(struct dhd_bus *bus);
76extern void dhd_bus_isr(bool * InterruptRecognized, bool * QueueMiniportHandleInterrupt, void *arg);
77
78
79/* Check for and handle local prot-specific iovar commands */
80extern int dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
81 void *params, int plen, void *arg, int len, bool set);
82
83/* Add bus dump output to a buffer */
84extern void dhd_bus_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf);
85
86/* Clear any bus counters */
87extern void dhd_bus_clearcounts(dhd_pub_t *dhdp);
88
89/* return the dongle chipid */
90extern uint dhd_bus_chip(struct dhd_bus *bus);
91
92/* Set user-specified nvram parameters. */
93extern void dhd_bus_set_nvram_params(struct dhd_bus * bus, const char *nvram_params);
94
95extern void *dhd_bus_pub(struct dhd_bus *bus);
96extern void *dhd_bus_txq(struct dhd_bus *bus);
97extern uint dhd_bus_hdrlen(struct dhd_bus *bus);
98
99#endif /* _dhd_bus_h_ */