Linux 4.19.133
[linux/fpc-iii.git] / drivers / net / wireless / broadcom / brcm80211 / brcmfmac / msgbuf.h
blob692235d252779935ad33f266a842de7c5f933fe6
1 /* Copyright (c) 2014 Broadcom Corporation
3 * Permission to use, copy, modify, and/or distribute this software for any
4 * purpose with or without fee is hereby granted, provided that the above
5 * copyright notice and this permission notice appear in all copies.
7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 #ifndef BRCMFMAC_MSGBUF_H
16 #define BRCMFMAC_MSGBUF_H
18 #ifdef CONFIG_BRCMFMAC_PROTO_MSGBUF
20 #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_MAX_ITEM 64
21 #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 512
22 #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_MAX_ITEM 64
23 #define BRCMF_D2H_MSGRING_TX_COMPLETE_MAX_ITEM 1024
24 #define BRCMF_D2H_MSGRING_RX_COMPLETE_MAX_ITEM 512
25 #define BRCMF_H2D_TXFLOWRING_MAX_ITEM 512
27 #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_ITEMSIZE 40
28 #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_ITEMSIZE 32
29 #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_ITEMSIZE 24
30 #define BRCMF_D2H_MSGRING_TX_COMPLETE_ITEMSIZE_PRE_V7 16
31 #define BRCMF_D2H_MSGRING_TX_COMPLETE_ITEMSIZE 24
32 #define BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE_PRE_V7 32
33 #define BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE 40
34 #define BRCMF_H2D_TXFLOWRING_ITEMSIZE 48
36 struct msgbuf_buf_addr {
37 __le32 low_addr;
38 __le32 high_addr;
41 int brcmf_proto_msgbuf_rx_trigger(struct device *dev);
42 void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid);
43 int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr);
44 void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr);
45 #else
46 static inline int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)
48 return 0;
50 static inline void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr) {}
51 #endif
53 #endif /* BRCMFMAC_MSGBUF_H */