1*b4c3e9b5SBjoern A. Zeeb // SPDX-License-Identifier: ISC 2*b4c3e9b5SBjoern A. Zeeb /* 3*b4c3e9b5SBjoern A. Zeeb * Copyright (c) 2014 Broadcom Corporation 4*b4c3e9b5SBjoern A. Zeeb */ 5*b4c3e9b5SBjoern A. Zeeb #ifndef BRCMFMAC_MSGBUF_H 6*b4c3e9b5SBjoern A. Zeeb #define BRCMFMAC_MSGBUF_H 7*b4c3e9b5SBjoern A. Zeeb 8*b4c3e9b5SBjoern A. Zeeb #ifdef CONFIG_BRCMFMAC_PROTO_MSGBUF 9*b4c3e9b5SBjoern A. Zeeb 10*b4c3e9b5SBjoern A. Zeeb #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_MAX_ITEM 64 11*b4c3e9b5SBjoern A. Zeeb #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 1024 12*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_MAX_ITEM 64 13*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_TX_COMPLETE_MAX_ITEM 1024 14*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_RX_COMPLETE_MAX_ITEM 1024 15*b4c3e9b5SBjoern A. Zeeb #define BRCMF_H2D_TXFLOWRING_MAX_ITEM 512 16*b4c3e9b5SBjoern A. Zeeb 17*b4c3e9b5SBjoern A. Zeeb #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_ITEMSIZE 40 18*b4c3e9b5SBjoern A. Zeeb #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_ITEMSIZE 32 19*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_ITEMSIZE 24 20*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_TX_COMPLETE_ITEMSIZE_PRE_V7 16 21*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_TX_COMPLETE_ITEMSIZE 24 22*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE_PRE_V7 32 23*b4c3e9b5SBjoern A. Zeeb #define BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE 40 24*b4c3e9b5SBjoern A. Zeeb #define BRCMF_H2D_TXFLOWRING_ITEMSIZE 48 25*b4c3e9b5SBjoern A. Zeeb 26*b4c3e9b5SBjoern A. Zeeb struct msgbuf_buf_addr { 27*b4c3e9b5SBjoern A. Zeeb __le32 low_addr; 28*b4c3e9b5SBjoern A. Zeeb __le32 high_addr; 29*b4c3e9b5SBjoern A. Zeeb }; 30*b4c3e9b5SBjoern A. Zeeb 31*b4c3e9b5SBjoern A. Zeeb int brcmf_proto_msgbuf_rx_trigger(struct device *dev); 32*b4c3e9b5SBjoern A. Zeeb void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid); 33*b4c3e9b5SBjoern A. Zeeb int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr); 34*b4c3e9b5SBjoern A. Zeeb void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr); 35*b4c3e9b5SBjoern A. Zeeb #else brcmf_proto_msgbuf_attach(struct brcmf_pub * drvr)36*b4c3e9b5SBjoern A. Zeebstatic inline int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) 37*b4c3e9b5SBjoern A. Zeeb { 38*b4c3e9b5SBjoern A. Zeeb return 0; 39*b4c3e9b5SBjoern A. Zeeb } brcmf_proto_msgbuf_detach(struct brcmf_pub * drvr)40*b4c3e9b5SBjoern A. Zeebstatic inline void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr) {} 41*b4c3e9b5SBjoern A. Zeeb #endif 42*b4c3e9b5SBjoern A. Zeeb 43*b4c3e9b5SBjoern A. Zeeb #endif /* BRCMFMAC_MSGBUF_H */ 44