diff options
Diffstat (limited to 'drivers/staging/brcm80211/include/hnddma.h')
-rw-r--r-- | drivers/staging/brcm80211/include/hnddma.h | 91 |
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_ |
22 | typedef const struct hnddma_pub hnddma_t; | 22 | struct 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 */ |
33 | typedef void (*di_detach_t) (hnddma_t *dmah); | 33 | typedef void (*di_detach_t) (struct hnddma_pub *dmah); |
34 | typedef bool(*di_txreset_t) (hnddma_t *dmah); | 34 | typedef bool(*di_txreset_t) (struct hnddma_pub *dmah); |
35 | typedef bool(*di_rxreset_t) (hnddma_t *dmah); | 35 | typedef bool(*di_rxreset_t) (struct hnddma_pub *dmah); |
36 | typedef bool(*di_rxidle_t) (hnddma_t *dmah); | 36 | typedef bool(*di_rxidle_t) (struct hnddma_pub *dmah); |
37 | typedef void (*di_txinit_t) (hnddma_t *dmah); | 37 | typedef void (*di_txinit_t) (struct hnddma_pub *dmah); |
38 | typedef bool(*di_txenabled_t) (hnddma_t *dmah); | 38 | typedef bool(*di_txenabled_t) (struct hnddma_pub *dmah); |
39 | typedef void (*di_rxinit_t) (hnddma_t *dmah); | 39 | typedef void (*di_rxinit_t) (struct hnddma_pub *dmah); |
40 | typedef void (*di_txsuspend_t) (hnddma_t *dmah); | 40 | typedef void (*di_txsuspend_t) (struct hnddma_pub *dmah); |
41 | typedef void (*di_txresume_t) (hnddma_t *dmah); | 41 | typedef void (*di_txresume_t) (struct hnddma_pub *dmah); |
42 | typedef bool(*di_txsuspended_t) (hnddma_t *dmah); | 42 | typedef bool(*di_txsuspended_t) (struct hnddma_pub *dmah); |
43 | typedef bool(*di_txsuspendedidle_t) (hnddma_t *dmah); | 43 | typedef bool(*di_txsuspendedidle_t) (struct hnddma_pub *dmah); |
44 | typedef int (*di_txfast_t) (hnddma_t *dmah, void *p, bool commit); | 44 | typedef int (*di_txfast_t) (struct hnddma_pub *dmah, struct sk_buff *p, |
45 | typedef int (*di_txunframed_t) (hnddma_t *dmah, void *p, uint len, | 45 | bool commit); |
46 | typedef int (*di_txunframed_t) (struct hnddma_pub *dmah, void *p, uint len, | ||
46 | bool commit); | 47 | bool commit); |
47 | typedef void *(*di_getpos_t) (hnddma_t *di, bool direction); | 48 | typedef void *(*di_getpos_t) (struct hnddma_pub *di, bool direction); |
48 | typedef void (*di_fifoloopbackenable_t) (hnddma_t *dmah); | 49 | typedef void (*di_fifoloopbackenable_t) (struct hnddma_pub *dmah); |
49 | typedef bool(*di_txstopped_t) (hnddma_t *dmah); | 50 | typedef bool(*di_txstopped_t) (struct hnddma_pub *dmah); |
50 | typedef bool(*di_rxstopped_t) (hnddma_t *dmah); | 51 | typedef bool(*di_rxstopped_t) (struct hnddma_pub *dmah); |
51 | typedef bool(*di_rxenable_t) (hnddma_t *dmah); | 52 | typedef bool(*di_rxenable_t) (struct hnddma_pub *dmah); |
52 | typedef bool(*di_rxenabled_t) (hnddma_t *dmah); | 53 | typedef bool(*di_rxenabled_t) (struct hnddma_pub *dmah); |
53 | typedef void *(*di_rx_t) (hnddma_t *dmah); | 54 | typedef void *(*di_rx_t) (struct hnddma_pub *dmah); |
54 | typedef bool(*di_rxfill_t) (hnddma_t *dmah); | 55 | typedef bool(*di_rxfill_t) (struct hnddma_pub *dmah); |
55 | typedef void (*di_txreclaim_t) (hnddma_t *dmah, txd_range_t range); | 56 | typedef void (*di_txreclaim_t) (struct hnddma_pub *dmah, txd_range_t range); |
56 | typedef void (*di_rxreclaim_t) (hnddma_t *dmah); | 57 | typedef void (*di_rxreclaim_t) (struct hnddma_pub *dmah); |
57 | typedef unsigned long (*di_getvar_t) (hnddma_t *dmah, const char *name); | 58 | typedef unsigned long (*di_getvar_t) (struct hnddma_pub *dmah, |
58 | typedef void *(*di_getnexttxp_t) (hnddma_t *dmah, txd_range_t range); | 59 | const char *name); |
59 | typedef void *(*di_getnextrxp_t) (hnddma_t *dmah, bool forceall); | 60 | typedef void *(*di_getnexttxp_t) (struct hnddma_pub *dmah, txd_range_t range); |
60 | typedef void *(*di_peeknexttxp_t) (hnddma_t *dmah); | 61 | typedef void *(*di_getnextrxp_t) (struct hnddma_pub *dmah, bool forceall); |
61 | typedef void *(*di_peeknextrxp_t) (hnddma_t *dmah); | 62 | typedef void *(*di_peeknexttxp_t) (struct hnddma_pub *dmah); |
62 | typedef void (*di_rxparam_get_t) (hnddma_t *dmah, u16 *rxoffset, | 63 | typedef void *(*di_peeknextrxp_t) (struct hnddma_pub *dmah); |
64 | typedef void (*di_rxparam_get_t) (struct hnddma_pub *dmah, u16 *rxoffset, | ||
63 | u16 *rxbufsize); | 65 | u16 *rxbufsize); |
64 | typedef void (*di_txblock_t) (hnddma_t *dmah); | 66 | typedef void (*di_txblock_t) (struct hnddma_pub *dmah); |
65 | typedef void (*di_txunblock_t) (hnddma_t *dmah); | 67 | typedef void (*di_txunblock_t) (struct hnddma_pub *dmah); |
66 | typedef uint(*di_txactive_t) (hnddma_t *dmah); | 68 | typedef uint(*di_txactive_t) (struct hnddma_pub *dmah); |
67 | typedef void (*di_txrotate_t) (hnddma_t *dmah); | 69 | typedef void (*di_txrotate_t) (struct hnddma_pub *dmah); |
68 | typedef void (*di_counterreset_t) (hnddma_t *dmah); | 70 | typedef void (*di_counterreset_t) (struct hnddma_pub *dmah); |
69 | typedef uint(*di_ctrlflags_t) (hnddma_t *dmah, uint mask, uint flags); | 71 | typedef uint(*di_ctrlflags_t) (struct hnddma_pub *dmah, uint mask, uint flags); |
70 | typedef char *(*di_dump_t) (hnddma_t *dmah, struct bcmstrbuf *b, | 72 | typedef char *(*di_dump_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b, |
71 | bool dumpring); | 73 | bool dumpring); |
72 | typedef char *(*di_dumptx_t) (hnddma_t *dmah, struct bcmstrbuf *b, | 74 | typedef char *(*di_dumptx_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b, |
73 | bool dumpring); | 75 | bool dumpring); |
74 | typedef char *(*di_dumprx_t) (hnddma_t *dmah, struct bcmstrbuf *b, | 76 | typedef char *(*di_dumprx_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b, |
75 | bool dumpring); | 77 | bool dumpring); |
76 | typedef uint(*di_rxactive_t) (hnddma_t *dmah); | 78 | typedef uint(*di_rxactive_t) (struct hnddma_pub *dmah); |
77 | typedef uint(*di_txpending_t) (hnddma_t *dmah); | 79 | typedef uint(*di_txpending_t) (struct hnddma_pub *dmah); |
78 | typedef uint(*di_txcommitted_t) (hnddma_t *dmah); | 80 | typedef uint(*di_txcommitted_t) (struct hnddma_pub *dmah); |
79 | 81 | ||
80 | /* dma opsvec */ | 82 | /* dma opsvec */ |
81 | typedef struct di_fcn_s { | 83 | typedef 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 | ||
144 | extern hnddma_t *dma_attach(osl_t *osh, char *name, si_t *sih, | 146 | extern 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; | |||
238 | extern uint dma_addrwidth(si_t *sih, void *dmaregs); | 241 | extern uint dma_addrwidth(si_t *sih, void *dmaregs); |
239 | 242 | ||
240 | /* pio helpers */ | 243 | /* pio helpers */ |
241 | extern void dma_txpioloopback(osl_t *osh, dma32regs_t *); | 244 | extern void dma_txpioloopback(struct osl_info *osh, dma32regs_t *); |
242 | 245 | ||
243 | #endif /* _hnddma_h_ */ | 246 | #endif /* _hnddma_h_ */ |