1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 3 4 #ifndef _QTN_FMAC_SHM_IPC_DEFS_H_ 5 #define _QTN_FMAC_SHM_IPC_DEFS_H_ 6 7 #include <linux/types.h> 8 9 #define QTN_IPC_REG_HDR_SZ (32) 10 #define QTN_IPC_REG_SZ (4096) 11 #define QTN_IPC_MAX_DATA_SZ (QTN_IPC_REG_SZ - QTN_IPC_REG_HDR_SZ) 12 13 enum qtnf_shm_ipc_region_flags { 14 QTNF_SHM_IPC_NEW_DATA = BIT(0), 15 QTNF_SHM_IPC_ACK = BIT(1), 16 }; 17 18 struct qtnf_shm_ipc_region_header { 19 __le32 flags; 20 __le16 data_len; 21 } __packed; 22 23 union qtnf_shm_ipc_region_headroom { 24 struct qtnf_shm_ipc_region_header hdr; 25 u8 headroom[QTN_IPC_REG_HDR_SZ]; 26 } __packed; 27 28 struct qtnf_shm_ipc_region { 29 union qtnf_shm_ipc_region_headroom headroom; 30 u8 data[QTN_IPC_MAX_DATA_SZ]; 31 } __packed; 32 33 #endif /* _QTN_FMAC_SHM_IPC_DEFS_H_ */ 34