staging: brcm80211: remove wireless extensions support from brcmfmac
[deliverable/linux.git] / drivers / staging / brcm80211 / brcmfmac / dhd_bus.h
CommitLineData
cf2b4488
HP
1/*
2 * Copyright (c) 2010 Broadcom Corporation
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#ifndef _dhd_bus_h_
18#define _dhd_bus_h_
19
20/*
21 * Exported from dhd bus module (dhd_usb, dhd_sdio)
22 */
23
24/* Indicate (dis)interest in finding dongles. */
25extern int dhd_bus_register(void);
26extern void dhd_bus_unregister(void);
27
28/* Download firmware image and nvram image */
e69284f2 29extern bool dhd_bus_download_firmware(struct dhd_bus *bus,
8da4a3a0 30 char *fw_path, char *nv_path);
cf2b4488
HP
31
32/* Stop bus module: clear pending frames, disable data flow */
33extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
34
35/* Initialize bus module: prepare for communication w/dongle */
36extern int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex);
37
38/* Send a data frame to the dongle. Callee disposes of txp. */
c26b1378 39extern int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *txp);
cf2b4488
HP
40
41/* Send/receive a control message to/from the dongle.
42 * Expects caller to enforce a single outstanding transaction.
43 */
580a0bd9
GKH
44extern int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
45extern int dhd_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
cf2b4488
HP
46
47/* Watchdog timer function */
48extern bool dhd_bus_watchdog(dhd_pub_t *dhd);
49
50#ifdef DHD_DEBUG
51/* Device console input function */
580a0bd9 52extern int dhd_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
cf2b4488
HP
53#endif /* DHD_DEBUG */
54
0f0881b0 55/* Deferred processing for the bus, return true requests reschedule */
cf2b4488
HP
56extern bool dhd_bus_dpc(struct dhd_bus *bus);
57extern void dhd_bus_isr(bool *InterruptRecognized,
58 bool *QueueMiniportHandleInterrupt, void *arg);
59
60/* Check for and handle local prot-specific iovar commands */
61extern int dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
62 void *params, int plen, void *arg, int len,
63 bool set);
64
65/* Add bus dump output to a buffer */
67ad48bc 66extern void dhd_bus_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf);
cf2b4488
HP
67
68/* Clear any bus counters */
69extern void dhd_bus_clearcounts(dhd_pub_t *dhdp);
70
71/* return the dongle chipid */
72extern uint dhd_bus_chip(struct dhd_bus *bus);
73
74/* Set user-specified nvram parameters. */
75extern void dhd_bus_set_nvram_params(struct dhd_bus *bus,
76 const char *nvram_params);
77
78extern void *dhd_bus_pub(struct dhd_bus *bus);
79extern void *dhd_bus_txq(struct dhd_bus *bus);
80extern uint dhd_bus_hdrlen(struct dhd_bus *bus);
81
82#endif /* _dhd_bus_h_ */
This page took 0.164128 seconds and 5 git commands to generate.