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.
20 /* forward declaration */
23 /* This controls how many packets are given to the dongle. This is required as
24 * NTXD needs to be power of 2 but we may not have enough memory to absorb that
25 * large number of frames
28 #define NRPCTXBUFPOST NTXD
31 #if defined(WLC_HIGH_ONLY)
37 #define RPCTX_ENAB(pub) (true)
38 extern rpctx_info_t *wlc_rpctx_attach(wlc_pub_t *pub, struct wlc_info *wlc);
39 extern int wlc_rpctx_fifoinit(rpctx_info_t *rpctx, uint fifo, uint ntxd);
40 extern void wlc_rpctx_detach(rpctx_info_t *rpctx);
41 extern int wlc_rpctx_dump(rpctx_info_t *rpctx, struct bcmstrbuf *b);
42 extern void *wlc_rpctx_getnexttxp(rpctx_info_t *rpctx, uint fifo);
43 extern void wlc_rpctx_txreclaim(rpctx_info_t *rpctx);
44 extern uint wlc_rpctx_txavail(rpctx_info_t *rpctx, uint fifo);
45 extern int wlc_rpctx_pkteng(rpctx_info_t *rpctx, uint fifo, void *p);
46 extern int wlc_rpctx_tx(rpctx_info_t *rpctx, uint fifo, void *p, bool commit,
47 u16 frameid, u8 txpktpend);
48 extern void wlc_rpctx_txpktpendinc(rpctx_info_t *rpctx, uint fifo, u8 val);
49 extern void wlc_rpctx_txpktpenddec(rpctx_info_t *rpctx, uint fifo, u8 val);
50 extern void wlc_rpctx_txpktpendclr(rpctx_info_t *rpctx, uint fifo);
51 extern int wlc_rpctx_txpktpend(rpctx_info_t *rpctx, uint fifo, bool all);
54 #define RPCTX_ENAB(pub) (false)
55 #define wlc_rpctx_attach(pub, wlc) (NULL)
56 #define wlc_rpctx_fifoinit(rpctx, fifo, ntxd) (0)
57 #define wlc_rpctx_detach(rpctx) ASSERT(0)
58 #define wlc_rpctx_txavail(rpctx, f) (false)
59 #define wlc_rpctx_dump(rpctx, b) (0)
60 #define wlc_rpctx_getnexttxp(rpctx, f) (NULL)
61 #define wlc_rpctx_txreclaim(rpctx) ASSERT(0)
62 #define wlc_rpctx_pkteng(rpctx, fifo, p) do { } while (0)
63 #define wlc_rpctx_tx(rpctx, f, p, c, fid, t) (0)
64 #define wlc_rpctx_txpktpendinc(rpctx, f, val) do { } while (0)
65 #define wlc_rpctx_txpktpenddec(rpctx, f, val) do { } while (0)
66 #define wlc_rpctx_txpktpendclr(rpctx, f) do { } while (0)
67 #define wlc_rpctx_txpktpend(rpctx, f, all) (0)
71 #endif /* _wlc_rpctx_h_ */