aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/include/hnddma.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/brcm80211/include/hnddma.h')
-rw-r--r--drivers/staging/brcm80211/include/hnddma.h91
1 files changed, 47 insertions, 44 deletions
diff --git a/drivers/staging/brcm80211/include/hnddma.h b/drivers/staging/brcm80211/include/hnddma.h
index bee4c89be23..4c5462baf11 100644
--- a/drivers/staging/brcm80211/include/hnddma.h
+++ b/drivers/staging/brcm80211/include/hnddma.h
@@ -19,7 +19,7 @@
19 19
20#ifndef _hnddma_pub_ 20#ifndef _hnddma_pub_
21#define _hnddma_pub_ 21#define _hnddma_pub_
22typedef const struct hnddma_pub hnddma_t; 22struct hnddma_pub;
23#endif /* _hnddma_pub_ */ 23#endif /* _hnddma_pub_ */
24 24
25/* range param for dma_getnexttxp() and dma_txreclaim */ 25/* range param for dma_getnexttxp() and dma_txreclaim */
@@ -30,52 +30,54 @@ typedef enum txd_range {
30} txd_range_t; 30} txd_range_t;
31 31
32/* dma function type */ 32/* dma function type */
33typedef void (*di_detach_t) (hnddma_t *dmah); 33typedef void (*di_detach_t) (struct hnddma_pub *dmah);
34typedef bool(*di_txreset_t) (hnddma_t *dmah); 34typedef bool(*di_txreset_t) (struct hnddma_pub *dmah);
35typedef bool(*di_rxreset_t) (hnddma_t *dmah); 35typedef bool(*di_rxreset_t) (struct hnddma_pub *dmah);
36typedef bool(*di_rxidle_t) (hnddma_t *dmah); 36typedef bool(*di_rxidle_t) (struct hnddma_pub *dmah);
37typedef void (*di_txinit_t) (hnddma_t *dmah); 37typedef void (*di_txinit_t) (struct hnddma_pub *dmah);
38typedef bool(*di_txenabled_t) (hnddma_t *dmah); 38typedef bool(*di_txenabled_t) (struct hnddma_pub *dmah);
39typedef void (*di_rxinit_t) (hnddma_t *dmah); 39typedef void (*di_rxinit_t) (struct hnddma_pub *dmah);
40typedef void (*di_txsuspend_t) (hnddma_t *dmah); 40typedef void (*di_txsuspend_t) (struct hnddma_pub *dmah);
41typedef void (*di_txresume_t) (hnddma_t *dmah); 41typedef void (*di_txresume_t) (struct hnddma_pub *dmah);
42typedef bool(*di_txsuspended_t) (hnddma_t *dmah); 42typedef bool(*di_txsuspended_t) (struct hnddma_pub *dmah);
43typedef bool(*di_txsuspendedidle_t) (hnddma_t *dmah); 43typedef bool(*di_txsuspendedidle_t) (struct hnddma_pub *dmah);
44typedef int (*di_txfast_t) (hnddma_t *dmah, void *p, bool commit); 44typedef int (*di_txfast_t) (struct hnddma_pub *dmah, struct sk_buff *p,
45typedef int (*di_txunframed_t) (hnddma_t *dmah, void *p, uint len, 45 bool commit);
46typedef int (*di_txunframed_t) (struct hnddma_pub *dmah, void *p, uint len,
46 bool commit); 47 bool commit);
47typedef void *(*di_getpos_t) (hnddma_t *di, bool direction); 48typedef void *(*di_getpos_t) (struct hnddma_pub *di, bool direction);
48typedef void (*di_fifoloopbackenable_t) (hnddma_t *dmah); 49typedef void (*di_fifoloopbackenable_t) (struct hnddma_pub *dmah);
49typedef bool(*di_txstopped_t) (hnddma_t *dmah); 50typedef bool(*di_txstopped_t) (struct hnddma_pub *dmah);
50typedef bool(*di_rxstopped_t) (hnddma_t *dmah); 51typedef bool(*di_rxstopped_t) (struct hnddma_pub *dmah);
51typedef bool(*di_rxenable_t) (hnddma_t *dmah); 52typedef bool(*di_rxenable_t) (struct hnddma_pub *dmah);
52typedef bool(*di_rxenabled_t) (hnddma_t *dmah); 53typedef bool(*di_rxenabled_t) (struct hnddma_pub *dmah);
53typedef void *(*di_rx_t) (hnddma_t *dmah); 54typedef void *(*di_rx_t) (struct hnddma_pub *dmah);
54typedef bool(*di_rxfill_t) (hnddma_t *dmah); 55typedef bool(*di_rxfill_t) (struct hnddma_pub *dmah);
55typedef void (*di_txreclaim_t) (hnddma_t *dmah, txd_range_t range); 56typedef void (*di_txreclaim_t) (struct hnddma_pub *dmah, txd_range_t range);
56typedef void (*di_rxreclaim_t) (hnddma_t *dmah); 57typedef void (*di_rxreclaim_t) (struct hnddma_pub *dmah);
57typedef unsigned long (*di_getvar_t) (hnddma_t *dmah, const char *name); 58typedef unsigned long (*di_getvar_t) (struct hnddma_pub *dmah,
58typedef void *(*di_getnexttxp_t) (hnddma_t *dmah, txd_range_t range); 59 const char *name);
59typedef void *(*di_getnextrxp_t) (hnddma_t *dmah, bool forceall); 60typedef void *(*di_getnexttxp_t) (struct hnddma_pub *dmah, txd_range_t range);
60typedef void *(*di_peeknexttxp_t) (hnddma_t *dmah); 61typedef void *(*di_getnextrxp_t) (struct hnddma_pub *dmah, bool forceall);
61typedef void *(*di_peeknextrxp_t) (hnddma_t *dmah); 62typedef void *(*di_peeknexttxp_t) (struct hnddma_pub *dmah);
62typedef void (*di_rxparam_get_t) (hnddma_t *dmah, u16 *rxoffset, 63typedef void *(*di_peeknextrxp_t) (struct hnddma_pub *dmah);
64typedef void (*di_rxparam_get_t) (struct hnddma_pub *dmah, u16 *rxoffset,
63 u16 *rxbufsize); 65 u16 *rxbufsize);
64typedef void (*di_txblock_t) (hnddma_t *dmah); 66typedef void (*di_txblock_t) (struct hnddma_pub *dmah);
65typedef void (*di_txunblock_t) (hnddma_t *dmah); 67typedef void (*di_txunblock_t) (struct hnddma_pub *dmah);
66typedef uint(*di_txactive_t) (hnddma_t *dmah); 68typedef uint(*di_txactive_t) (struct hnddma_pub *dmah);
67typedef void (*di_txrotate_t) (hnddma_t *dmah); 69typedef void (*di_txrotate_t) (struct hnddma_pub *dmah);
68typedef void (*di_counterreset_t) (hnddma_t *dmah); 70typedef void (*di_counterreset_t) (struct hnddma_pub *dmah);
69typedef uint(*di_ctrlflags_t) (hnddma_t *dmah, uint mask, uint flags); 71typedef uint(*di_ctrlflags_t) (struct hnddma_pub *dmah, uint mask, uint flags);
70typedef char *(*di_dump_t) (hnddma_t *dmah, struct bcmstrbuf *b, 72typedef char *(*di_dump_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b,
71 bool dumpring); 73 bool dumpring);
72typedef char *(*di_dumptx_t) (hnddma_t *dmah, struct bcmstrbuf *b, 74typedef char *(*di_dumptx_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b,
73 bool dumpring); 75 bool dumpring);
74typedef char *(*di_dumprx_t) (hnddma_t *dmah, struct bcmstrbuf *b, 76typedef char *(*di_dumprx_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b,
75 bool dumpring); 77 bool dumpring);
76typedef uint(*di_rxactive_t) (hnddma_t *dmah); 78typedef uint(*di_rxactive_t) (struct hnddma_pub *dmah);
77typedef uint(*di_txpending_t) (hnddma_t *dmah); 79typedef uint(*di_txpending_t) (struct hnddma_pub *dmah);
78typedef uint(*di_txcommitted_t) (hnddma_t *dmah); 80typedef uint(*di_txcommitted_t) (struct hnddma_pub *dmah);
79 81
80/* dma opsvec */ 82/* dma opsvec */
81typedef struct di_fcn_s { 83typedef struct di_fcn_s {
@@ -141,7 +143,8 @@ struct hnddma_pub {
141 uint txnobuf; /* tx out of dma descriptors */ 143 uint txnobuf; /* tx out of dma descriptors */
142}; 144};
143 145
144extern hnddma_t *dma_attach(osl_t *osh, char *name, si_t *sih, 146extern struct hnddma_pub *dma_attach(struct osl_info *osh, char *name,
147 si_t *sih,
145 void *dmaregstx, void *dmaregsrx, uint ntxd, 148 void *dmaregstx, void *dmaregsrx, uint ntxd,
146 uint nrxd, uint rxbufsize, int rxextheadroom, 149 uint nrxd, uint rxbufsize, int rxextheadroom,
147 uint nrxpost, uint rxoffset, uint *msg_level); 150 uint nrxpost, uint rxoffset, uint *msg_level);
@@ -238,6 +241,6 @@ extern const di_fcn_t dma64proc;
238extern uint dma_addrwidth(si_t *sih, void *dmaregs); 241extern uint dma_addrwidth(si_t *sih, void *dmaregs);
239 242
240/* pio helpers */ 243/* pio helpers */
241extern void dma_txpioloopback(osl_t *osh, dma32regs_t *); 244extern void dma_txpioloopback(struct osl_info *osh, dma32regs_t *);
242 245
243#endif /* _hnddma_h_ */ 246#endif /* _hnddma_h_ */