• 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  * Description: hmac_config.c 的头文件.
15  */
16 
17 #ifndef __HMAC_CONFIG_H__
18 #define __HMAC_CONFIG_H__
19 
20 /*****************************************************************************
21   1 其他头文件包含
22 *****************************************************************************/
23 #include "hmac_device.h"
24 #ifdef _PRE_WLAN_DFR_STAT
25 #include "hmac_dfr.h"
26 #endif
27 
28 #ifdef __cplusplus
29 #if __cplusplus
30 extern "C" {
31 #endif
32 #endif
33 
34 #undef  THIS_FILE_ID
35 #define THIS_FILE_ID OAM_FILE_ID_HMAC_CONFIG_H
36 
37 /*****************************************************************************
38   2 宏定义
39 *****************************************************************************/
40 #define HMAC_MAX_MCS_NUM                    8   /* 单流和双流支持的mac最大个数 */
41 #define QUICK_SEND_RESULT_INVALID   255
42 
43 #ifdef _PRE_WLAN_DFT_STAT
44 #define WAL_CFG_TIME_OUT_MS        5000
45 #endif
46 /*****************************************************************************
47   3 枚举定义
48 *****************************************************************************/
49 /*****************************************************************************
50   4 全局变量声明
51 *****************************************************************************/
52 
53 /*****************************************************************************
54   5 消息头定义
55 *****************************************************************************/
56 
57 
58 /*****************************************************************************
59   6 消息定义
60 *****************************************************************************/
61 
62 
63 /*****************************************************************************
64   7 STRUCT定义
65 *****************************************************************************/
66 typedef struct {
67     uint8_t  ie_type;
68     uint8_t  ie_id;
69 } cfg_ie_info_stru;
70 /*****************************************************************************
71   8 UNION定义
72 *****************************************************************************/
73 
74 
75 /*****************************************************************************
76   9 OTHERS定义
77 *****************************************************************************/
78 
79 
80 /*****************************************************************************
81   10 函数声明
82 *****************************************************************************/
83 osal_void hmac_cfg_init(osal_void);
84 osal_void hmac_cfg_exit(osal_void);
85 extern osal_u32  hmac_config_sta_update_rates_etc(hmac_vap_stru *hmac_vap,
86     mac_cfg_mode_param_stru *cfg_mode, mac_bss_dscr_stru *bss_dscr);
87 
88 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
89 osal_s32 hmac_config_set_all_log_level_etc(hmac_vap_stru *hmac_vap, frw_msg *msg);
90 #endif /* #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE */
91 
92 extern osal_s32 hmac_config_remove_app_ie(hmac_vap_stru *hmac_vap, frw_msg *msg);
93 
94 #ifdef _PRE_WLAN_FEATURE_WPA3
95 osal_s32 hmac_config_external_auth(hmac_vap_stru *hmac_vap, frw_msg *msg);
96 osal_s32 hmac_update_owe_info(hmac_vap_stru *hmac_vap, frw_msg *msg);
97 #endif
98 
99 #ifdef _PRE_WLAN_FEATURE_11D
100 osal_s32  hmac_config_set_rd_by_ie_switch_etc(hmac_vap_stru *hmac_vap, frw_msg *msg);
101 #endif
102 
103 osal_s32 hmac_config_set_mode_cb(hmac_vap_stru *hmac_vap, frw_msg *msg);
104 
105 extern osal_s32 hmac_config_set_chan_meas(hmac_vap_stru *hmac_vap, frw_msg *msg);
106 osal_s8 hmac_config_get_free_power(const hmac_vap_stru *hmac_vap);
107 osal_s32 hmac_cfg_vap_init_event(hmac_device_stru *hmac_device);
108 osal_void hmac_config_set_quick_result(osal_u8 result);
109 osal_u8 hmac_config_get_quick_result(osal_void);
110 
111 osal_void h2d_cfg_init(osal_void);
112 osal_s32 hmac_config_vap_state_syn(hmac_vap_stru *hmac_vap, mac_vap_state_enum_uint8 new_vap_state);
113 
114 osal_void hmac_config_scan_abort(hmac_vap_stru *hmac_vap);
115 osal_s32 hmac_config_reduce_sar(hmac_vap_stru *hmac_vap, frw_msg *msg);
116 osal_s32 hmac_config_get_dieid(hmac_vap_stru *hmac_vap, frw_msg *msg);
117 osal_s32 hmac_config_set_mode(hmac_vap_stru *hmac_vap, const mac_cfg_mode_param_stru *old_param);
118 
119 osal_s32 hmac_config_set_freq(hmac_vap_stru *hmac_vap, osal_u8 value);
120 #ifdef _PRE_WLAN_FEATURE_PNO_SCAN
121 osal_s32 hmac_config_stop_sched_scan(hmac_vap_stru *hmac_vap, frw_msg *msg);
122 #endif
123 osal_s32 hmac_40m_intol_update_ap(hmac_vap_stru *hmac_vap, frw_msg *msg);
124 osal_s32 hmac_config_set_channel(hmac_vap_stru *hmac_vap, mac_cfg_channel_param_stru *channel_param);
125 osal_s32 hmac_config_connect(hmac_vap_stru *hmac_vap, frw_msg *msg);
126 #ifdef _PRE_WLAN_WIRELESS_EXT
127 osal_s32 hmac_config_start_iwlist_scan(hmac_vap_stru *hmac_vap, frw_msg *msg);
128 #endif
129 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
130 osal_s32 hmac_config_set_dyn_cali_param(hmac_vap_stru *hmac_vap, frw_msg *msg);
131 #endif
132 osal_s32 hmac_config_get_fem_pa_status(hmac_vap_stru *hmac_vap, frw_msg *msg);
133 osal_u32 hmac_get_g_gul_dual_antenna_enable(osal_void);
134 
135 osal_s32 hmac_cali_to_hmac(hmac_vap_stru *hmac_vap, frw_msg *msg);
136 #ifdef _PRE_WLAN_ONLINE_DPD
137 osal_s32 hmac_dpd_to_hmac(hmac_vap_stru *hmac_vap, frw_msg *msg);
138 #endif
139 
140 osal_u32 hmac_fill_sys_rsp(frw_msg *msg, osal_u16 len, const osal_u8 *param);
141 osal_u32 hmac_config_vap_mib_update(hmac_vap_stru *hmac_vap);
142 osal_u32 hmac_config_vap_cap_update(hmac_vap_stru *hmac_vap);
143 #ifdef _PRE_WLAN_CFGID_DEBUG
144 osal_s32 hmac_config_rssi_limit(hmac_vap_stru *hmac_vap, frw_msg *msg);
145 #endif
146 osal_s32 hmac_config_beacon_chain_switch(hmac_vap_stru *hmac_vap, frw_msg *msg);
147 osal_s32 hmac_config_set_log_level(hmac_vap_stru *hmac_vap, frw_msg *msg);
148 osal_void hmac_config_rx_he_rom_en_handle(const hmac_vap_stru *hmac_vap);
149 #ifdef _PRE_WLAN_CFGID_DEBUG
150 osal_s32 hmac_config_vap_info(hmac_vap_stru *hmac_vap);
151 #endif
152 #if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
153 osal_s32 hmac_config_query_status(hmac_vap_stru *hmac_vap, frw_msg *msg);
154 #endif
155 osal_s32 hmac_config_send_custom_pkt(hmac_vap_stru *hmac_vap, frw_msg *msg);
156 #if defined(_PRE_WLAN_FEATURE_ALWAYS_TX) || defined(_PRE_WLAN_CFGID_DEBUG)
157 osal_s32 hmac_config_reg_write(hmac_vap_stru *hmac_vap, frw_msg *msg);
158 #endif
159 osal_s32 hmac_config_query_rssi(hmac_vap_stru *hmac_vap, frw_msg *msg);
160 osal_s32 hmac_config_query_psst(hmac_vap_stru *hmac_vap, frw_msg *msg);
161 
162 #ifdef _PRE_WLAN_SUPPORT_CCPRIV_CMD
163 osal_s32 hmac_config_reg_info(hmac_vap_stru *hmac_vap, frw_msg *msg);
164 #endif
165 
166 #ifdef _PRE_WLAN_FEATURE_SNIFFER
167 osal_s32 hmac_config_wifi_sniffer_switch(hmac_vap_stru *hmac_vap, frw_msg *msg);
168 #endif
169 
170 #ifdef _PRE_WLAN_DFT_STAT
171 osal_s32  hmac_config_query_ani(hmac_vap_stru *hmac_vap, frw_msg *msg);
172 #endif
173 
174 osal_s32 hmac_config_ch_status_sync_ext(hmac_vap_stru *hmac_vap, mac_ap_ch_info_stru *ch_info, osal_u16 info_len);
175 osal_s32 hmac_config_set_txpower(hmac_vap_stru *hmac_vap, osal_u8 value);
176 #ifdef _PRE_WLAN_CFGID_DEBUG
177 osal_s32 hmac_config_wfa_cfg_aifsn(hmac_vap_stru *hmac_vap, frw_msg *msg);
178 osal_s32 hmac_config_wfa_cfg_cw(hmac_vap_stru *hmac_vap, frw_msg *msg);
179 #endif
180 
181 osal_s32 hmac_config_suspend_action_sync(hmac_vap_stru *hmac_vap, frw_msg *msg);
182 
183 osal_s32 hmac_config_adjust_tx_power(hmac_vap_stru *hmac_vap, frw_msg *msg);
184 osal_s32 hmac_config_set_rate_power_offset(hmac_vap_stru *hmac_vap, frw_msg *msg);
185 osal_s32 hmac_config_set_cal_tone(hmac_vap_stru *hmac_vap, frw_msg *msg);
186 
187 osal_s32 hmac_config_restore_tx_power(hmac_vap_stru *hmac_vap, frw_msg *msg);
188 osal_s32 hmac_config_set_rf_limit_power(hmac_vap_stru *hmac_vap, frw_msg *msg);
189 
190 osal_u32 hmac_reset_hw(hal_to_dmac_device_stru *hal_device, const hmac_reset_para_stru *reset_para);
191 
192 osal_s32 hmac_config_cali_dump_info(hmac_vap_stru *hmac_vap, frw_msg *msg);
193 
194 osal_s32 hmac_config_set_dbm(hmac_vap_stru *hmac_vap, frw_msg *msg);
195 osal_s32 hmac_config_get_tsf(hmac_vap_stru *hmac_vap, frw_msg *msg);
196 
197 osal_s32 hmac_config_custom_cfg_priv_ini(hmac_vap_stru *hmac_vap, frw_msg *msg);
198 osal_s32 hmac_config_tx_complete_data(hmac_vap_stru *hmac_vap, frw_msg *msg);
199 osal_s32 hmac_config_keepalive_sync_timestamp(hmac_vap_stru *hmac_vap, frw_msg *msg);
200 osal_s32 hmac_config_set_beacon_period(hmac_vap_stru *hmac_vap, frw_msg *msg);
201 osal_s32 hmac_config_tx_comp_schedule(hmac_vap_stru *hmac_vap, frw_msg *msg);
202 osal_s32 hmac_hal_device_sync(hal_to_dmac_device_stru *hal_device);
203 osal_s32 hmac_device_sync(hmac_device_stru *hmac_device);
204 #ifdef _PRE_WLAN_FEATURE_M2S
205 osal_s32 hmac_m2s_switch_protect_comp_event_status(hmac_vap_stru *hmac_vap,
206     hmac_m2s_complete_syn_stru *m2s_comp_param);
207 #endif
208 osal_s32 hmac_config_dump_phy(hmac_vap_stru *hmac_vap, frw_msg *msg);
209 osal_s32 hmac_config_dump_mac(hmac_vap_stru *hmac_vap, frw_msg *msg);
210 osal_s32 hmac_config_dump_stats(hmac_vap_stru *hmac_vap, frw_msg *msg);
211 #ifdef _PRE_WIFI_DEBUG
212 osal_s32 hmac_config_set_tx_data_type_debug(hmac_vap_stru *hmac_vap, frw_msg *msg);
213 osal_u8 hal_tx_data_type_debug_on(osal_void);
214 #endif
215 osal_s32 hmac_config_mac_ant_select(hmac_vap_stru *hmac_vap, frw_msg *msg);
216 osal_s32 hmac_config_phy_ant_select(hmac_vap_stru *hmac_vap, frw_msg *msg);
217 osal_s32 hmac_config_phy_ant_select_enable(hmac_vap_stru *hmac_vap, frw_msg *msg);
218 osal_u32 wifi_get_init_start_time(osal_void);
219 osal_void wifi_set_init_start_time(osal_void);
220 #if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
221 osal_u8 hmac_is_mgmt_report_enable(osal_void);
222 #endif
223 
224 #ifdef __cplusplus
225 #if __cplusplus
226 }
227 #endif
228 #endif
229 
230 #endif /* end of hmac_main */
231