• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Header file of device and host hmac_ext_if public interface.
15  * Create: 2022-11-26
16  */
17 
18 #ifndef __DMAC_EXT_IF_TYPE_H__
19 #define __DMAC_EXT_IF_TYPE_H__
20 
21 #include "dmac_ext_if_type_rom.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25     extern "C" {
26 #endif
27 #endif
28 
29 typedef enum {
30     DMAC_DISASOC_MISC_LINKLOSS             = 0,
31     DMAC_DISASOC_MISC_KEEPALIVE            = 1,
32     DMAC_DISASOC_MISC_CHANNEL_MISMATCH     = 2,
33     DMAC_DISASOC_MISC_LOW_RSSI             = 3,
34     DMAC_DISASOC_MISC_GET_CHANNEL_IDX_FAIL = 4,
35 
36     DMAC_DISASOC_MISC_BUTT
37 } dmac_disasoc_misc_reason_enum;
38 typedef osal_u16 dmac_disasoc_misc_reason_enum_uint16;
39 
40 typedef enum {
41     BTCOEX_RX_WINDOW_SIZE_INDEX_0 = 0,
42     BTCOEX_RX_WINDOW_SIZE_INDEX_1 = 1,
43     BTCOEX_RX_WINDOW_SIZE_INDEX_2 = 2,
44     BTCOEX_RX_WINDOW_SIZE_INDEX_3 = 3,
45 
46     BTCOEX_RX_WINDOW_SIZE_INDEX_BUTT
47 } btcoex_rx_window_size_index_enum;
48 typedef osal_u8 btcoex_rx_window_size_index_enum_uint8;
49 
50 typedef enum {
51     BTCOEX_RATE_THRESHOLD_MIN = 0,
52     BTCOEX_RATE_THRESHOLD_MAX = 1,
53 
54     BTCOEX_RATE_THRESHOLD_BUTT
55 } btcoex_rate_threshold_enum;
56 typedef osal_u8 btcoex_rate_threshold_enum_uint8;
57 
58 typedef enum {
59     BTCOEX_RX_WINDOW_SIZE_HOLD = 0,
60     BTCOEX_RX_WINDOW_SIZE_DECREASE = 1,
61     BTCOEX_RX_WINDOW_SIZE_INCREASE = 2,
62 
63     BTCOEX_RX_WINDOW_SIZE_BUTT
64 } btcoex_rx_window_size_enum;
65 typedef osal_u8 btcoex_rx_window_size_enum_uint8;
66 
67 typedef enum {
68     BTCOEX_RX_WINDOW_SIZE_GRADE_0 = 0,
69     BTCOEX_RX_WINDOW_SIZE_GRADE_1 = 1,
70 
71     BTCOEX_RX_WINDOW_SIZE_GRADE_BUTT
72 } btcoex_rx_window_size_grade_enum;
73 typedef osal_u8 btcoex_rx_window_size_grade_enum_uint8;
74 
75 typedef enum {
76     BTCOEX_ACTIVE_MODE_A2DP = 0,
77     BTCOEX_ACTIVE_MODE_SCO = 1,
78     BTCOEX_ACTIVE_MODE_TRANSFER = 2,
79 
80     BTCOEX_ACTIVE_MODE_BUTT
81 } btcoex_active_mode_enum;
82 typedef osal_u8 btcoex_active_mode_enum_uint8;
83 
84 typedef struct {
85     osal_u8                            cac_machw_en;          /* 1min cac 发送队列开关状态 */
86 } dmac_set_cac_machw_info_stru;
87 
88 /* wait join写寄存器参数的结构体定义 */
89 typedef struct {
90     osal_u32              dtim_period;                  /* dtim period */
91     osal_u32              dtim_cnt;                     /* dtim count  */
92     osal_u8               bssid[WLAN_MAC_ADDR_LEN];    /* 加入的AP的BSSID  */
93     osal_u16              tsf_bit0;                     /* tsf bit0  */
94 } dmac_ctx_set_dtim_tsf_reg_stru;
95 
96 typedef struct {
97     osal_u8  reason;
98     osal_u16 event;
99     osal_u8  des_addr[WLAN_MAC_ADDR_LEN];
100     osal_u8  resv[3];
101 } dmac_diasoc_deauth_event;
102 
103 typedef struct {
104     osal_u32  cycles;                     /* 统计间隔时钟周期数 */
105     osal_u32  sw_tx_succ_num;             /* 软件统计发送成功ppdu个数 */
106     osal_u32  sw_tx_fail_num;             /* 软件统计发送失败ppdu个数 */
107     osal_u32  sw_rx_ampdu_succ_num;       /* 软件统计接收成功的ampdu个数 */
108     osal_u32  sw_rx_mpdu_succ_num;        /* 软件统计接收成功的mpdu个数 */
109     osal_u32  sw_rx_ppdu_fail_num;        /* 软件统计接收失败的ppdu个数 */
110     osal_u32  hw_rx_ampdu_fcs_fail_num;   /* 硬件统计接收ampdu fcs校验失败个数 */
111     osal_u32  hw_rx_mpdu_fcs_fail_num;    /* 硬件统计接收mpdu fcs校验失败个数 */
112 } dmac_thruput_info_sync_stru;
113 
114 typedef enum {
115     DMAC_CONFIG_IPV4 = 0,                /* 配置IPv4地址 */
116     DMAC_CONFIG_IPV6,                    /* 配置IPv6地址 */
117     DMAC_CONFIG_BUTT
118 } dmac_ip_type;
119 typedef osal_u8 dmac_ip_type_enum_uint8;
120 
121 typedef enum {
122     DMAC_IP_ADDR_ADD = 0,                /* 增加IP地址 */
123     DMAC_IP_ADDR_DEL,                    /* 删除IP地址 */
124     DMAC_IP_OPER_BUTT
125 } dmac_ip_oper;
126 typedef osal_u8 dmac_ip_oper_enum_uint8;
127 
128 typedef struct {
129     dmac_ip_type_enum_uint8         type;
130     dmac_ip_oper_enum_uint8         oper;
131 
132     osal_u8                         resv[2];
133 
134     osal_u8                         ip_addr[OAL_IP_ADDR_MAX_SIZE];
135     osal_u8                         mask_addr[OAL_IP_ADDR_MAX_SIZE];
136 } dmac_ip_addr_config_stru;
137 
138 typedef enum {
139     COMMON_DEBUG_KEEPALIVE = 0,
140     COMMON_DEBUG_BUTT
141 } mac_common_debug_enum;
142 
143 typedef enum {
144     P2P_PROTOCOL_BGN = 0,
145     P2P_PROTOCOL_AX,
146     P2P_PROTOCOL_BUTT
147 } p2p_protocol_debug_enum;
148 typedef osal_u8 p2p_protocol_debug_enum_uint8;
149 
150 typedef enum {
151     P2P_BAND_20M = 0,
152     P2P_BAND_40M,
153     P2P_BAND_BUTT
154 } p2p_band_debug_enum;
155 typedef osal_u8 p2p_band_debug_enum_uint8;
156 
157 /* P2P 整体的通用信息 */
158 typedef struct {
159     p2p_protocol_debug_enum_uint8 protocol_mode; /* 协议模式 */
160     p2p_band_debug_enum_uint8 band_width;        /* 协议模式 */
161     osal_u8 enable;                      /* 判断当前是否使能 */
162     osal_u8 resv;
163 } p2p_common_info_stru;
164 
165 #ifdef __cplusplus
166 #if __cplusplus
167     }
168 #endif
169 #endif
170 
171 #endif // __DMAC_EXT_IF_TYPE_ROM_H__
172