1daeccac2SArend van Spriel // SPDX-License-Identifier: ISC 2daeccac2SArend van Spriel /* 3daeccac2SArend van Spriel * Copyright (c) 2014 Broadcom Corporation 405491d2cSKalle Valo */ 505491d2cSKalle Valo #ifndef BRCMFMAC_MSGBUF_H 605491d2cSKalle Valo #define BRCMFMAC_MSGBUF_H 705491d2cSKalle Valo 805491d2cSKalle Valo #ifdef CONFIG_BRCMFMAC_PROTO_MSGBUF 905491d2cSKalle Valo 1005491d2cSKalle Valo #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_MAX_ITEM 64 11*f4847678SHector Martin #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 1024 1205491d2cSKalle Valo #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_MAX_ITEM 64 1305491d2cSKalle Valo #define BRCMF_D2H_MSGRING_TX_COMPLETE_MAX_ITEM 1024 14*f4847678SHector Martin #define BRCMF_D2H_MSGRING_RX_COMPLETE_MAX_ITEM 1024 1505491d2cSKalle Valo #define BRCMF_H2D_TXFLOWRING_MAX_ITEM 512 1605491d2cSKalle Valo 1705491d2cSKalle Valo #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_ITEMSIZE 40 1805491d2cSKalle Valo #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_ITEMSIZE 32 1905491d2cSKalle Valo #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_ITEMSIZE 24 20f56324baSFranky Lin #define BRCMF_D2H_MSGRING_TX_COMPLETE_ITEMSIZE_PRE_V7 16 21f56324baSFranky Lin #define BRCMF_D2H_MSGRING_TX_COMPLETE_ITEMSIZE 24 22f56324baSFranky Lin #define BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE_PRE_V7 32 23f56324baSFranky Lin #define BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE 40 2405491d2cSKalle Valo #define BRCMF_H2D_TXFLOWRING_ITEMSIZE 48 2505491d2cSKalle Valo 26be4b092cSFranky Lin struct msgbuf_buf_addr { 27be4b092cSFranky Lin __le32 low_addr; 28be4b092cSFranky Lin __le32 high_addr; 29be4b092cSFranky Lin }; 3005491d2cSKalle Valo 3105491d2cSKalle Valo int brcmf_proto_msgbuf_rx_trigger(struct device *dev); 3219c8f421SHante Meuleman void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid); 3305491d2cSKalle Valo int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr); 3405491d2cSKalle Valo void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr); 3505491d2cSKalle Valo #else brcmf_proto_msgbuf_attach(struct brcmf_pub * drvr)3605491d2cSKalle Valostatic inline int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) 3705491d2cSKalle Valo { 3805491d2cSKalle Valo return 0; 3905491d2cSKalle Valo } brcmf_proto_msgbuf_detach(struct brcmf_pub * drvr)4005491d2cSKalle Valostatic inline void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr) {} 4105491d2cSKalle Valo #endif 4205491d2cSKalle Valo 4305491d2cSKalle Valo #endif /* BRCMFMAC_MSGBUF_H */ 44