2
* Copyright (c) 2010 Broadcom Corporation
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.
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.
21
* Exported from dhd bus module (dhd_usb, dhd_sdio)
24
/* Indicate (dis)interest in finding dongles. */
25
extern int dhd_bus_register(void);
26
extern void dhd_bus_unregister(void);
28
/* Download firmware image and nvram image */
29
extern bool dhd_bus_download_firmware(struct dhd_bus *bus,
30
char *fw_path, char *nv_path);
32
/* Stop bus module: clear pending frames, disable data flow */
33
extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
35
/* Initialize bus module: prepare for communication w/dongle */
36
extern int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex);
38
/* Send a data frame to the dongle. Callee disposes of txp. */
39
extern int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *txp);
41
/* Send/receive a control message to/from the dongle.
42
* Expects caller to enforce a single outstanding transaction.
44
extern int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
45
extern int dhd_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
47
/* Watchdog timer function */
48
extern bool dhd_bus_watchdog(dhd_pub_t *dhd);
51
/* Device console input function */
52
extern int dhd_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
53
#endif /* DHD_DEBUG */
55
/* Deferred processing for the bus, return true requests reschedule */
56
extern bool dhd_bus_dpc(struct dhd_bus *bus);
57
extern void dhd_bus_isr(bool *InterruptRecognized,
58
bool *QueueMiniportHandleInterrupt, void *arg);
60
/* Check for and handle local prot-specific iovar commands */
61
extern int dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
62
void *params, int plen, void *arg, int len,
65
/* Add bus dump output to a buffer */
66
extern void dhd_bus_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf);
68
/* Clear any bus counters */
69
extern void dhd_bus_clearcounts(dhd_pub_t *dhdp);
71
/* return the dongle chipid */
72
extern uint dhd_bus_chip(struct dhd_bus *bus);
74
/* Set user-specified nvram parameters. */
75
extern void dhd_bus_set_nvram_params(struct dhd_bus *bus,
76
const char *nvram_params);
78
extern void *dhd_bus_pub(struct dhd_bus *bus);
79
extern void *dhd_bus_txq(struct dhd_bus *bus);
80
extern uint dhd_bus_hdrlen(struct dhd_bus *bus);
82
#endif /* _dhd_bus_h_ */