1 /* 2 * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef __OAL_DATA_COLLECT_H__ 20 #define __OAL_DATA_COLLECT_H__ 21 22 #ifdef __cplusplus 23 #if __cplusplus 24 extern "C" { 25 #endif 26 #endif 27 28 /* 配置命令含义 */ 29 typedef enum { 30 WLAN_DEBUG_DATA_ACQ = 0, /* DEBUG数据采集 */ 31 WLAN_ABB_DATA_ACQ = 1, /* ABB数据采集 */ 32 WLAN_ABB_DATA_GEN = 2, /* ABB数据产生 */ 33 WLAN_CBB_DATA_ACQ = 3, /* CBB数据采集 */ 34 WLAN_MAC_DATA_ACQ = 4, /* MAC数据采集 */ 35 WLAN_PHY_DATA_ACQ = 5, /* PHY数据采集 */ 36 WLAN_CPU_TRACE_ACQ = 6, /* CPU_TRACE */ 37 WLAN_CPU_MONITOR_ACQ = 7, /* CPU_PC_MONITOR */ 38 WLAN_DATA_ACQ_STATUS = 8, /* 数据采集完成状态查询 */ 39 WLAN_DATA_ACQ_RECODE = 9, /* 数据采集完成获取数据 */ 40 41 WLAN_DATA_ACQ_BUTT 42 } wlan_data_acq_enum; 43 typedef hi_u8 wlan_data_acq_enum_uint8; 44 45 /* 数据采集状态 */ 46 typedef enum { 47 WLAN_DATA_ACQ_STATUS_INIT = 0, /* 初始化状态 */ 48 WLAN_DATA_ACQ_STATUS_ENABLE = 1, /* 处于数据采集状态 */ 49 WLAN_DATA_ACQ_STATUS_COMPLETE = 2, /* 处于数据采集完成状态 */ 50 51 WLAN_DATA_ACQ_STATUS_BUTT 52 } wlan_data_acq_status_enum; 53 typedef hi_u8 wlan_data_acq_status_enum_uint8; 54 55 /* 数据采集配置结构体 */ 56 typedef struct { 57 hi_u8 vap_id; /* 采集vap id */ 58 hi_u8 monitor_sel; /* 采集memory选择 */ 59 hi_u8 trace_recycle; /* 采集存储方式 */ 60 hi_u8 monitor_mode; /* 采集源头选择 */ 61 wlan_data_acq_enum_uint8 monitor_type; /* 采集模式 */ 62 hi_u8 mac_acq_type; /* MAC数采类型选择 */ 63 hi_u8 mac_acq_subtype; /* MAC数采子类型选择 */ 64 wlan_data_acq_status_enum_uint8 daq_status; /* 当前是否允许使能数据采集功能 */ 65 hi_u16 us_monitor_laddr; /* 初始地址配置 */ 66 hi_u16 us_monitor_haddr; /* 结束地址配置 */ 67 hi_u32 phy_acq_type:4, /* PHY数采类型选择 */ 68 phy_test_node_sel:8, /* PHY采样点选择 */ 69 phy_trig_cond:4, /* PHY采样触发条件 */ 70 phy_smp_aft_trig:16; /* PHY采样触发后采样点数 */ 71 } wlan_data_acq_stru; 72 73 typedef struct { 74 hi_u32 start_addr; /* 初始地址 */ 75 hi_u32 middle_addr1; /* 中间地址1 */ 76 hi_u32 middle_addr2; /* 中间地址2 */ 77 hi_u32 end_addr; /* 结束地址 */ 78 } wlan_acq_result_addr_stru; 79 80 #ifdef __cplusplus 81 #if __cplusplus 82 } 83 #endif 84 #endif 85 #endif 86