1*ff233cb5SSergey Matyukevich /* SPDX-License-Identifier: GPL-2.0+ */ 2*ff233cb5SSergey Matyukevich /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 398f44cb0SIgor Mitsyanko 498f44cb0SIgor Mitsyanko #ifndef _QTN_FMAC_SHM_IPC_DEFS_H_ 598f44cb0SIgor Mitsyanko #define _QTN_FMAC_SHM_IPC_DEFS_H_ 698f44cb0SIgor Mitsyanko 798f44cb0SIgor Mitsyanko #include <linux/types.h> 898f44cb0SIgor Mitsyanko 998f44cb0SIgor Mitsyanko #define QTN_IPC_REG_HDR_SZ (32) 1098f44cb0SIgor Mitsyanko #define QTN_IPC_REG_SZ (4096) 1198f44cb0SIgor Mitsyanko #define QTN_IPC_MAX_DATA_SZ (QTN_IPC_REG_SZ - QTN_IPC_REG_HDR_SZ) 1298f44cb0SIgor Mitsyanko 1398f44cb0SIgor Mitsyanko enum qtnf_shm_ipc_region_flags { 1498f44cb0SIgor Mitsyanko QTNF_SHM_IPC_NEW_DATA = BIT(0), 1598f44cb0SIgor Mitsyanko QTNF_SHM_IPC_ACK = BIT(1), 1698f44cb0SIgor Mitsyanko }; 1798f44cb0SIgor Mitsyanko 1898f44cb0SIgor Mitsyanko struct qtnf_shm_ipc_region_header { 1998f44cb0SIgor Mitsyanko __le32 flags; 2098f44cb0SIgor Mitsyanko __le16 data_len; 2198f44cb0SIgor Mitsyanko } __packed; 2298f44cb0SIgor Mitsyanko 2398f44cb0SIgor Mitsyanko union qtnf_shm_ipc_region_headroom { 2498f44cb0SIgor Mitsyanko struct qtnf_shm_ipc_region_header hdr; 2598f44cb0SIgor Mitsyanko u8 headroom[QTN_IPC_REG_HDR_SZ]; 2698f44cb0SIgor Mitsyanko } __packed; 2798f44cb0SIgor Mitsyanko 2898f44cb0SIgor Mitsyanko struct qtnf_shm_ipc_region { 2998f44cb0SIgor Mitsyanko union qtnf_shm_ipc_region_headroom headroom; 3098f44cb0SIgor Mitsyanko u8 data[QTN_IPC_MAX_DATA_SZ]; 3198f44cb0SIgor Mitsyanko } __packed; 3298f44cb0SIgor Mitsyanko 3398f44cb0SIgor Mitsyanko #endif /* _QTN_FMAC_SHM_IPC_DEFS_H_ */ 34