• 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: Header file of HAL external public interfaces .
15  * Create: 2020-7-3
16  */
17 
18 #ifndef __HAL_EXT_IF_H__
19 #define __HAL_EXT_IF_H__
20 
21 /*****************************************************************************
22   1 其他头文件包含
23 *****************************************************************************/
24 #include "oal_ext_if.h"
25 #include "oam_ext_if.h"
26 #include "frw_ext_if.h"
27 #include "wlan_types_common.h"
28 #include "hal_common_ops.h"
29 #include "dmac_common_inc_rom.h"
30 #include "hal_ext_anti_intf.h"
31 #include "hal_ext_txbf.h"
32 #include "hal_ext_tpc.h"
33 
34 #include "wlan_msg.h"
35 #include "hal_ext_if_device.h"
36 #ifdef _PRE_WLAN_FEATURE_P2P
37 #include "hal_p2p.h"
38 #endif
39 #include "hal_reg_opt.h"
40 #ifdef _PRE_WLAN_FEATURE_WS63
41 #include "hal_ext_if_rom.h"
42 #endif
43 #include "hal_power_save.h"
44 #include "hal_coex_reg.h"
45 #ifdef __cplusplus
46 #if __cplusplus
47 extern "C" {
48 #endif
49 #endif
50 
51 #undef  THIS_FILE_ID
52 #define THIS_FILE_ID OAM_FILE_ID_HAL_EXT_IF_ROM_H
53 /*****************************************************************************
54   2 宏定义
55 *****************************************************************************/
56 #define hal_btcoex_check_sw_preempt_delba_on(_pst_handler)   \
57     ((((*(osal_u8*)&((_pst_handler)->btcoex_sw_preempt.sw_preempt_mode)) & BIT1) != 0) ? OSAL_TRUE : OSAL_FALSE)
58 /* 获取当前hal devcie的ps业务是否打开标记 */
59 #define get_hal_device_btcoex_m2s_mode_bitmap(_pst_handler) \
60     (*(osal_u8*)&((_pst_handler)->device_btcoex_mgr.m2s_mode_bitmap)) /* 获取当前hal devcie的btcoex m2s业务bitmap */
61 #define get_hal_device_btcoex_s2m_mode_bitmap(_pst_handler) \
62     (*(osal_u8*)&((_pst_handler)->device_btcoex_mgr.s2m_mode_bitmap)) /* 获取当前hal devcie的btcoex s2m业务bitmap */
63 #define get_hal_device_btcoex_s2m_wait_bitmap(_pst_handler) \
64     (*(osal_u8*)&((_pst_handler)->device_btcoex_mgr.s2m_wait_bitmap))
65 
66 /* HAL模块和DMAC模块共用的WLAN RX结构体 */
67 typedef struct {
68     oal_netbuf_stru        *netbuf;         /* netbuf链表一个元素 */
69     osal_u16              netbuf_num;      /* netbuf链表的个数 */
70     osal_u8               auc_resv[2];        /* 2字节对齐 */
71 } hal_cali_hal2hmac_event_stru;
72 
73 typedef struct {
74     /* CCA能量门限 */
75     osal_s8 c_ed_cca_20th_high;    /* CCA 主辅20M带宽 */
76     osal_s8 c_ed_cca_40th_high;    /* CCA 主40M带宽 */
77 
78     /* 主20M CCA协议门限 */
79     osal_s8 c_sd_cca_20th_dsss;    /* CCA DSSS检测门限 */
80     osal_s8 c_sd_cca_20th_ofdm;    /* CCA OFDM检测门限,主20M带宽 */
81 } hal_alg_cca_th_stru;
82 
83 #ifndef _PRE_WLAN_FEATURE_WS63  //  与device侧同名的宏和函数用63宏控住
84 #define HAL_PM_DEF_TBTT_OFFSET              1000        /* tbtt提前量默认值单位us */
85 #ifdef BOARD_FPGA_WIFI
86 #define HAL_PM_DEF_EXT_TSF_OFFSET           30000       /* 外置tsf唤醒提前量单位us */
87 #else
88 #define HAL_PM_DEF_EXT_TSF_OFFSET           4500       /* 外置tsf唤醒提前量单位us */
89 #endif
90 #endif
91 
92 /* 获取当前状态机的上一个状态 */
93 #define get_hal_m2s_mode_tpye(_pst_handler)         (*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))
94 osal_s32 hal_hmac_main_init(osal_void);
95 osal_void  hal_hmac_main_exit(osal_void);
96 #ifndef _PRE_WLAN_FEATURE_WS63  //  与device侧同名的宏和函数用63宏控住
97 #define HAL_ANT_SWITCH_RSSI_MGMT_ENABLE             BIT0
98 #define HAL_ANT_SWITCH_RSSI_DATA_ENABLE             BIT1
99 /* 低功耗相关宏定义 */
100 
101 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
102 #define hal_cca_opt_get_default_ed_20th(_band, _cust) \
103     (((_band) == WLAN_BAND_2G) ? \
104      ((_cust)->delta_cca_ed_high_20th_2g + HAL_CCA_OPT_ED_HIGH_20TH_DEF) : \
105      ((_cust)->delta_cca_ed_high_20th_5g + HAL_CCA_OPT_ED_HIGH_20TH_DEF))
106 #define hal_cca_opt_get_default_ed_40th(_band, _cust) \
107     (((_band) == WLAN_BAND_2G) ? \
108      ((_cust)->delta_cca_ed_high_40th_2g + HAL_CCA_OPT_ED_HIGH_40TH_DEF) : \
109      ((_cust)->delta_cca_ed_high_40th_5g + HAL_CCA_OPT_ED_HIGH_40TH_DEF))
110 #endif
111 
112 /* 获取work的子状态 */
113 #define get_hal_dev_current_scan_idx(_pst_hal_device)   ((_pst_hal_device)->hal_scan_params.start_chan_idx + \
114     (_pst_hal_device)->hal_scan_params.scan_chan_idx)
115 #define INVALID_SAR_PWR_LIMIT                 (0XFF)   /* 当前SAR功率值 */
116 #define HAL_SAR_PWR_LIMIT_THRESHOLD            (15)    /* SAR功率阈值,低于阈值表示正在降SAR,高于阈值表示降SAR结束 */
117 #define hal_device_state_is_busy(_pst_hal_device)   \
118     ((((_pst_hal_device)->hal_dev_fsm.oal_fsm.cur_state == HAL_DEVICE_WORK_STATE) \
119       || ((_pst_hal_device)->hal_dev_fsm.oal_fsm.cur_state == HAL_DEVICE_SCAN_STATE)) ? OSAL_TRUE : OSAL_FALSE)
120 #define hal_device_prev_state_is_busy(_pst_hal_device)   \
121     ((((_pst_hal_device)->hal_dev_fsm.oal_fsm.prev_state == HAL_DEVICE_WORK_STATE) \
122       || ((_pst_hal_device)->hal_dev_fsm.oal_fsm.prev_state == HAL_DEVICE_SCAN_STATE)) ? OSAL_TRUE : OSAL_FALSE)
123 #ifdef _PRE_WLAN_FEATURE_M2S
124 #define get_hal_device_m2s_mgr(_pst_handler) \
125     (&(((hal_to_dmac_device_stru *)(_pst_handler))->device_m2s_mgr))
126 #define get_hal_device_m2s_switch_prot(_pst_handler)       (get_hal_device_m2s_mgr(_pst_handler)->m2s_switch_protect)
127 #define get_hal_device_m2s_del_swi_miso_hold(_pst_handler) (get_hal_device_m2s_mgr(_pst_handler)->delay_swi_miso_hold)
128 #define get_hal_device_m2s_mss_on(_pst_handler)            (get_hal_device_m2s_mgr(_pst_handler)->mss_on)
129 #define get_hal_device_m2s_rssi_mgmt_single_txchain(_pst_handler) \
130     (get_hal_device_m2s_mgr(_pst_handler)->rssi_mgmt_single_txchain)
131 #endif
132 
133 #define hal_m2s_check_fast_scan_on(_pst_handler)   \
134     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_FAST_SCAN) != 0) ?    \
135         OSAL_TRUE : OSAL_FALSE)
136 #define hal_m2s_check_rssi_on(_pst_handler)   \
137     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_RSSI) != 0) ? OSAL_TRUE : OSAL_FALSE)
138 #define hal_m2s_check_btcoex_on(_pst_handler)   \
139     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_BTCOEX) != 0) ?    \
140         OSAL_TRUE : OSAL_FALSE)
141 #define hal_m2s_check_command_on(_pst_handler)   \
142     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_COMMAND) != 0) ?    \
143         OSAL_TRUE : OSAL_FALSE)
144 #define hal_m2s_check_test_on(_pst_handler)   \
145     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_TEST) != 0) ? OSAL_TRUE : OSAL_FALSE)
146 #define hal_m2s_check_custom_on(_pst_handler)   \
147     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_CUSTOM) != 0) ?    \
148         OSAL_TRUE : OSAL_FALSE)
149 #define hal_m2s_check_spec_on(_pst_handler)   \
150     ((((*(osal_u8*)&((_pst_handler)->hal_m2s_fsm.m2s_mode))& WLAN_M2S_TRIGGER_MODE_SPEC) != 0) ? OSAL_TRUE : OSAL_FALSE)
151 #ifdef _PRE_WLAN_FEATURE_M2S
152 #define get_hal_device_rx_ant_rssi_mgmt(_pst_handler) \
153     (&(((hal_to_dmac_device_stru *)(_pst_handler))->hal_rx_ant_rssi_mgmt))
154 #endif
155 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
156  /* 获取动态校准是否未使能 */
157 #define get_hal_dyn_cali_disable(_pst_handler) \
158     ((_pst_handler)->dyn_cali_val.aus_cali_en_interval[(_pst_handler)->wifi_channel_status.band] == 0)
159 #endif
160 
161 /*****************************************************************************
162   8 UNION定义
163 *****************************************************************************/
164 typedef struct {
165     osal_void      (* func)(hal_to_dmac_device_stru  *hal_device, osal_u32 para);
166     osal_u32    param;
167 } hal_error_proc_stru;
168 
169 #ifdef _PRE_WLAN_FEATURE_DAQ
170 typedef enum {
171     HAL_MAC_DIAG_TEST_INIT = 0,
172     HAL_MAC_DIAG_TEST_MATCH,
173     HAL_MAC_DIAG_TEST_QUERY = 11,
174     HAL_MAC_DIAG_TEST_STOP,
175 } hal_mac_diag_test_type_enum;
176 typedef enum {
177     HAL_MAC_DIAG_DUG = 0,
178     HAL_MAC_DIAG_TEST1,
179     HAL_MAC_DIAG_TEST4 = 4,
180     HAL_MAC_DIAG_TEST8 = 8,
181 } hal_mac_diag_test_item_enum;
182 typedef enum {
183     HAL_MAC_TX_DIAG_MATCH_RA_ADDR = 0,
184     HAL_MAC_TX_DIAG_MATCH_TA_ADDR,
185     HAL_MAC_TX_DIAG_MATCH_FRM_TYPE,
186     HAL_MAC_RX_DIAG_MATCH_RA_ADDR,
187     HAL_MAC_RX_DIAG_MATCH_TA_ADDR,
188     HAL_MAC_RX_DIAG_MATCH_FRM_TYPE,
189     HAL_MAC_TX_RX_DIAG_MATCH_NUM,
190 } hal_mac_diag_test_match_enum;
191 typedef enum {
192     HAL_MAC_DIAG4_NODE_DBAC = 0,
193     HAL_MAC_DIAG4_NODE_FSM,
194     HAL_MAC_DIAG4_NODE_TX_AMPDU0,
195     HAL_MAC_DIAG4_NODE_TSF_VAP3 = 31,
196 } hal_mac_diag4_node_enum;
197 typedef enum {
198     HAL_MAC_DIAG8_NODE_H = 0,
199     HAL_MAC_DIAG8_NODE_HV,
200     HAL_MAC_DIAG8_NODE_SNR,
201     HAL_MAC_DIAG8_NODE_PHI_PSI,
202 } hal_mac_diag8_node_enum;
203 typedef enum {
204     HAL_MAC_DIAG_SEL_PKT_RAM_2KB = 0,
205     HAL_MAC_DIAG_SEL_PKT_RAM_4KB,
206     HAL_MAC_DIAG_SEL_PKT_RAM_6KB,
207     HAL_MAC_DIAG_SEL_PKT_RAM_8KB,
208     HAL_MAC_DIAG_SEL_PKT_RAM_10KB,
209     HAL_MAC_DIAG_SEL_PKT_RAM_12KB,
210     HAL_MAC_DIAG_SEL_PKT_RAM_14KB,
211     HAL_MAC_DIAG_SEL_PKT_RAM_16KB,
212 } hal_mac_diag_sel_pkt_ram_size_enum;
213 #endif
214 /*****************************************************************************
215   9 OTHERS定义
216 *****************************************************************************/
217 /*****************************************************************************
218   10 函数声明
219 *****************************************************************************/
220 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
221 osal_u8  hal_get_5g_cur_rf_chn_enable(osal_u8 cur_cali_chn);
222 #endif // #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
223 hal_cipher_protocol_type_enum_uint8 hal_cipher_suite_to_ctype(wlan_ciper_protocol_type_enum_uint8 cipher_suite);
224 wlan_ciper_protocol_type_enum_uint8 hal_ctype_to_cipher_suite(hal_cipher_protocol_type_enum_uint8 cipher_type);
225 
226 /*****************************************************************************
227   10.1 芯片级别函数
228 *****************************************************************************/
229 hal_to_dmac_device_stru *hal_chip_get_hal_device(osal_void);
230 osal_void hal_device_inc_assoc_user_nums(hal_to_dmac_device_stru  *hal_device);
231 hal_cfg_cap_info_stru *hal_device_get_cfg_custom_addr(osal_void);
232 osal_void hal_device_dec_assoc_user_nums(hal_to_dmac_device_stru  *hal_device);
233 osal_u8  hal_device_find_all_up_vap(const hal_to_dmac_device_stru *hal_device, osal_u8 *vap_id, osal_u8 lenth);
234 osal_void hal_device_handle_event(hal_to_dmac_device_stru *hal_device, osal_u16 type, osal_u16 datalen, osal_u8 *data);
235 osal_u32  hal_device_find_one_up_vap(hal_to_dmac_device_stru *hal_device, osal_u8 *mac_vap_id);
236 osal_u32  hal_device_find_another_up_vap(hal_to_dmac_device_stru *hal_device,
237     osal_u8 vap_id_self, osal_u8 *mac_vap_id);
238 osal_u32 hal_device_find_one_up_hal_vap(hal_to_dmac_device_stru *hal_device,  osal_u8 *vap_id);
239 osal_void  hal_device_get_fix_rate_pow_code_idx(const hal_tx_ctrl_desc_rate_stru *rate_param, osal_u8 *rate_pow_idx);
240 osal_void hal_device_set_pow_al_tx(const hal_to_dmac_device_stru *hal_device,
241     osal_u8 band, hal_tx_txop_alg_stru *txop_alg);
242 osal_void hal_device_p2p_adjust_upc(hal_to_dmac_device_stru *hal_device, osal_u8 cur_ch_num,
243     wlan_channel_band_enum_uint8 freq_band, wlan_channel_bandwidth_enum_uint8 bandwidth);
244 
245 oal_bool_enum_uint8 hal_get_hal_device_is_work(hal_to_dmac_device_stru *hal_device);
246 osal_u8 hal_pow_get_legacy_rate(hal_tx_ctrl_desc_rate_stru *tx_dscr);
247 #define get_hal_dev_current_scan_idx(_pst_hal_device)   ((_pst_hal_device)->hal_scan_params.start_chan_idx + \
248     (_pst_hal_device)->hal_scan_params.scan_chan_idx)
249 #ifdef _PRE_WLAN_FEATURE_DAQ
250 osal_void hal_set_mac_diag_param(osal_u8 vap_id, mac_cfg_mct_set_diag_stru *event_set_diag,
251     hal_to_dmac_device_mac_test_stru *hal_mac_test_device);
252 osal_void hal_set_mac_diag_mode(mac_cfg_mct_set_diag_stru *event_set_diag,
253     hal_to_dmac_device_mac_test_stru *hal_mac_test_device);
254 osal_void hal_set_mac_diag_test_query(hal_to_dmac_device_mac_test_stru *hal_mac_test_device);
255 #endif
256 /*****************************************************************************
257   10.3.2 DEVICE级别   第一个入参类型为 hal_to_dmac_device_stru
258 *****************************************************************************/
hal_rx_init_dscr_queue(hal_to_dmac_device_stru * device,osal_u8 set_hw)259 static INLINE__ osal_void hal_rx_init_dscr_queue(hal_to_dmac_device_stru *device, osal_u8 set_hw)
260 {
261     hal_public_hook_func(_rx_init_dscr_queue)(device, set_hw);
262 }
263 
hal_rx_destroy_dscr_queue(hal_to_dmac_device_stru * device)264 static INLINE__ osal_void hal_rx_destroy_dscr_queue(hal_to_dmac_device_stru *device)
265 {
266     hal_public_hook_func(_rx_destroy_dscr_queue)(device);
267 }
268 
269 /* 填充描述符的基本信息,包括帧长度、mac长度、安全信息 */
hal_tx_fill_basic_ctrl_dscr(const hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr,hal_tx_mpdu_stru * mpdu)270 static INLINE__ osal_void hal_tx_fill_basic_ctrl_dscr(const hal_to_dmac_device_stru *hal_device,
271     hal_tx_dscr_stru *tx_dscr, hal_tx_mpdu_stru *mpdu)
272 {
273     hal_public_hook_func(_tx_fill_basic_ctrl_dscr)(hal_device, tx_dscr, mpdu);
274 }
275 
276 /* 将两个描述符连起来 */
hal_tx_ctrl_dscr_link(const hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr_prev,hal_tx_dscr_stru * tx_dscr)277 static INLINE__ osal_void  hal_tx_ctrl_dscr_link(const hal_to_dmac_device_stru * hal_device,
278     hal_tx_dscr_stru *tx_dscr_prev, hal_tx_dscr_stru *tx_dscr)
279 {
280     unref_param(hal_device);
281     hal_public_hook_func(_tx_ctrl_dscr_link)(tx_dscr_prev, tx_dscr);
282 }
283 
284 /* 从描述符的next获取下一个描述符地址 */
hal_get_tx_dscr_next(const hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr,hal_tx_dscr_stru ** tx_dscr_next)285 static INLINE__ osal_void  hal_get_tx_dscr_next(const hal_to_dmac_device_stru * hal_device, hal_tx_dscr_stru *tx_dscr,
286     hal_tx_dscr_stru **tx_dscr_next)
287 {
288     unref_param(hal_device);
289     hal_public_hook_func(_get_tx_dscr_next)(tx_dscr, tx_dscr_next);
290 }
291 
hal_tx_ctrl_dscr_unlink(const hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr)292 static INLINE__ osal_void  hal_tx_ctrl_dscr_unlink(const hal_to_dmac_device_stru * hal_device,
293     hal_tx_dscr_stru *tx_dscr)
294 {
295     unref_param(hal_device);
296     hal_public_hook_func(_tx_ctrl_dscr_unlink)(tx_dscr);
297 }
298 
hal_tx_get_vap_id(const hal_to_dmac_device_stru * hal_device,const hal_tx_dscr_stru * tx_dscr,osal_u8 * vap_id)299 static INLINE__ osal_void hal_tx_get_vap_id(const hal_to_dmac_device_stru * hal_device,
300     const hal_tx_dscr_stru * tx_dscr, osal_u8 *vap_id)
301 {
302     unref_param(hal_device);
303     hal_public_hook_func(_tx_get_vap_id)(tx_dscr, vap_id);
304 }
305 
306 /*****************************************************************************
307  功能描述  : 获取发送队列状态
308 *****************************************************************************/
hal_get_tx_q_status(osal_u8 qnum)309 static INLINE__ osal_u32 hal_get_tx_q_status(osal_u8 qnum)
310 {
311     return hal_public_hook_func(_get_tx_q_status)(qnum);
312 }
313 
314 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
315 /*****************************************************************************
316  函 数 名  : 动态校准配置恢复
317 *****************************************************************************/
hal_rf_init_dyn_cali_reg_conf(hal_to_dmac_device_stru * hal_device)318 static INLINE__ osal_void hal_rf_init_dyn_cali_reg_conf(hal_to_dmac_device_stru *hal_device)
319 {
320     hal_public_hook_func(_rf_init_dyn_cali_reg_conf)(hal_device);
321 }
322 
hal_tx_set_pdet_en(const hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr,oal_bool_enum_uint8 pdet_en_flag)323 static INLINE__ osal_void  hal_tx_set_pdet_en(const hal_to_dmac_device_stru *hal_device, hal_tx_dscr_stru *tx_dscr,
324     oal_bool_enum_uint8 pdet_en_flag)
325 {
326     hal_public_hook_func(_tx_set_pdet_en)(hal_device, tx_dscr, pdet_en_flag);
327 }
328 
329 #endif
330 
331 /*****************************************************************************
332  函 数 名  : hal_set_ana_dbb_ch_sel
333  功能描述  : 设置天线和phy通道对应关系
334 *****************************************************************************/
hal_set_ana_dbb_ch_sel(hal_to_dmac_device_stru * hal_device)335 static INLINE__ osal_void  hal_set_ana_dbb_ch_sel(hal_to_dmac_device_stru *hal_device)
336 {
337     hal_public_hook_func(_set_ana_dbb_ch_sel)(hal_device);
338 }
339 
340 /*****************************************************************************
341  函 数 名  : hal_update_ext_lna_cfg
342  功能描述  : 更新EXT LNA
343 *****************************************************************************/
hal_update_cbb_cfg(hal_to_dmac_device_stru * hal_device)344 static INLINE__ osal_void  hal_update_cbb_cfg(hal_to_dmac_device_stru *hal_device)
345 {
346     hal_public_hook_func(_update_cbb_cfg)(hal_device);
347 }
348 
hal_get_hal_vap(const hal_to_dmac_device_stru * hal_device,osal_u8 vap_id,hal_to_dmac_vap_stru ** hal_vap)349 static INLINE__ osal_void hal_get_hal_vap(const hal_to_dmac_device_stru * hal_device, osal_u8 vap_id,
350     hal_to_dmac_vap_stru **hal_vap)
351 {
352     hal_public_hook_func(_get_hal_vap)(hal_device, vap_id, hal_vap);
353 }
354 
355 /*****************************************************************************
356  功能描述  : 按bit读取32位寄存器的值,寄存器值右移offset后取后bits位
357 *****************************************************************************/
hal_reg_read_bit(osal_u32 addr,osal_u8 offset,osal_u8 bits)358 static INLINE__ osal_u32 hal_reg_read_bit(osal_u32 addr, osal_u8 offset, osal_u8 bits)
359 {
360     osal_u32 value = hal_reg_read(addr);
361 
362     return (value >> offset) & (((osal_u32)1 << bits) - 1);
363 }
364 
365 /*****************************************************************************
366  功能描述  : 写32位寄存器对应bits位的值
367 *****************************************************************************/
hal_reg_write_bits(osal_u32 reg_addr,osal_u8 offset,osal_u8 bits,osal_u32 reg_val)368 static INLINE__ osal_void hal_reg_write_bits(osal_u32 reg_addr, osal_u8 offset, osal_u8 bits, osal_u32 reg_val)
369 {
370     osal_u32 value = hal_reg_read(reg_addr);
371     value &= ~((((osal_u32)1 << bits) - 1) << offset);   /* 先将对应bits位的值清0 */
372     value |= ((reg_val & (((osal_u32)1 << bits) - 1)) << offset); /* 将对应bits值改写为配置值 */
373     hal_reg_write(reg_addr, value);
374 }
375 
376 /*****************************************************************************
377  功能描述  : 写16位寄存器对应bits位的值
378 *****************************************************************************/
hal_reg_write16_bits(osal_u32 reg_addr,osal_u8 offset,osal_u8 bits,osal_u32 reg_val)379 static INLINE__ osal_void hal_reg_write16_bits(osal_u32 reg_addr, osal_u8 offset, osal_u8 bits, osal_u32 reg_val)
380 {
381     osal_u16 value = hal_reg_read16(reg_addr);
382     value &= ~((((osal_u16)1 << bits) - 1) << offset);   /* 先将对应bits位的值清0 */
383     value |= ((reg_val & (((osal_u16)1 << bits) - 1)) << offset); /* 将对应bits值改写为配置值 */
384     hal_reg_write16(reg_addr, value);
385 }
386 
hal_reg_write16_or_bits(osal_u32 reg_addr,osal_u32 or_val)387 static INLINE__ osal_void hal_reg_write16_or_bits(osal_u32 reg_addr, osal_u32 or_val)
388 {
389     osal_u16 value = hal_reg_read16(reg_addr);
390     value |= or_val;
391     hal_reg_write16(reg_addr, value);
392 }
393 
394 /*****************************************************************************
395  功能描述  : 读取表寄存器的值
396 *****************************************************************************/
hal_reg_write_tbl(const hal_reg32_cfg_stru * reg_tbl,osal_u8 tbl_len)397 static INLINE__ osal_void hal_reg_write_tbl(const hal_reg32_cfg_stru *reg_tbl, osal_u8 tbl_len)
398 {
399     osal_u8 index;
400     for (index = 0; index < tbl_len; index++) {
401         hal_reg_write(reg_tbl[index].address, reg_tbl[index].value);
402     }
403 }
404 
hal_reg_write16_tbl(const hal_reg16_cfg_stru * reg_tbl,osal_u8 tbl_len)405 static INLINE__ osal_void hal_reg_write16_tbl(const hal_reg16_cfg_stru *reg_tbl, osal_u8 tbl_len)
406 {
407     osal_u8 index;
408     for (index = 0; index < tbl_len; index++) {
409         hal_reg_write16(reg_tbl[index].address, reg_tbl[index].value);
410     }
411 }
412 
413 /*****************************************************************************
414  功能描述  : 写表寄存器的值
415 *****************************************************************************/
hal_reg_read_tbl(hal_reg32_cfg_stru * reg_tbl,osal_u8 tbl_len)416 static INLINE__ osal_void hal_reg_read_tbl(hal_reg32_cfg_stru *reg_tbl, osal_u8 tbl_len)
417 {
418     osal_u8 index;
419     for (index = 0; index < tbl_len; index++) {
420         reg_tbl[index].value = hal_reg_read(reg_tbl[index].address);
421     }
422 }
423 
hal_reg_read16_tbl(hal_reg16_cfg_stru * reg_tbl,osal_u8 tbl_len)424 static INLINE__ osal_void hal_reg_read16_tbl(hal_reg16_cfg_stru *reg_tbl, osal_u8 tbl_len)
425 {
426     osal_u8 index;
427     for (index = 0; index < tbl_len; index++) {
428         reg_tbl[index].value = hal_reg_read(reg_tbl[index].address);
429     }
430 }
431 
432 /*****************************************************************************
433   hal初始化/退出/复位相关接口
434 *****************************************************************************/
435 /*****************************************************************************
436  功能描述  : 停止PA和PHY的工作
437 *****************************************************************************/
hal_disable_machw_phy_and_pa(osal_void)438 static INLINE__ osal_void hal_disable_machw_phy_and_pa(osal_void)
439 {
440     hal_public_hook_func(_disable_machw_phy_and_pa)();
441 }
442 
443 /*****************************************************************************
444  功能描述  : 停止PA和PHY的工作
445 *****************************************************************************/
hal_enable_machw_phy_and_pa(const hal_to_dmac_device_stru * hal_device)446 static INLINE__ osal_void hal_enable_machw_phy_and_pa(const hal_to_dmac_device_stru *hal_device)
447 {
448     hal_public_hook_func(_enable_machw_phy_and_pa)(hal_device);
449 }
450 
451 /*****************************************************************************
452  函 数 名  : hal_recover_machw_phy_and_pa
453  功能描述  : 恢复hal_to_dmac_device_stru中记录的pa状态
454 *****************************************************************************/
hal_recover_machw_phy_and_pa(hal_to_dmac_device_stru * hal_device)455 static INLINE__ osal_void  hal_recover_machw_phy_and_pa(hal_to_dmac_device_stru *hal_device)
456 {
457     hal_public_hook_func(_recover_machw_phy_and_pa)(hal_device);
458 }
459 
460 /*****************************************************************************
461   hal MAC hardware初始化接口
462 *****************************************************************************/
463 /*****************************************************************************
464  功能描述  : MAC hardware初始化接口
465 *****************************************************************************/
466 osal_void  hal_initialize_machw(osal_void);
467 
468 /*****************************************************************************
469  功能描述  : MAC hardware 公共区域初始化接口
470 *****************************************************************************/
hal_initialize_machw_common(osal_void)471 static INLINE__ osal_void hal_initialize_machw_common(osal_void)
472 {
473     hal_public_hook_func(_initialize_machw_common)();
474 }
475 
476 /*****************************************************************************
477  函 数 名  : hal_set_bandwidth_mode
478  功能描述  : 设置带宽
479 *****************************************************************************/
hal_set_bandwidth_mode(hal_to_dmac_device_stru * hal_device,wlan_channel_bandwidth_enum_uint8 bandwidth)480 static INLINE__ osal_void  hal_set_bandwidth_mode(hal_to_dmac_device_stru *hal_device,
481     wlan_channel_bandwidth_enum_uint8 bandwidth)
482 {
483     hal_public_hook_func(_set_bandwidth_mode)(hal_device, bandwidth);
484 }
485 
486 /*****************************************************************************
487  功能描述  : 复位mac寄存器保存
488 *****************************************************************************/
hal_reset_save_mac_reg(osal_void)489 static INLINE__ osal_void hal_reset_save_mac_reg(osal_void)
490 {
491     hal_public_hook_func(_reset_save_mac_reg)();
492 }
493 
494 /*****************************************************************************
495  功能描述  : 控制硬件在收到RTS时不回CTS
496 *****************************************************************************/
hal_disable_machw_cts_trans(osal_void)497 static INLINE__ osal_void  hal_disable_machw_cts_trans(osal_void)
498 {
499     hal_public_hook_func(_disable_machw_cts_trans)();
500 }
501 
502 /*****************************************************************************
503  功能描述  : 控制硬件在收到RTS时回CTS
504 *****************************************************************************/
hal_enable_machw_cts_trans(osal_void)505 static INLINE__ osal_void  hal_enable_machw_cts_trans(osal_void)
506 {
507     hal_public_hook_func(_enable_machw_cts_trans)();
508 }
509 
510 /*****************************************************************************
511  函 数 名  : hal_initialize_phy
512 *****************************************************************************/
513 osal_void  hal_initialize_phy(osal_void);
514 
515 #ifdef _PRE_WLAN_FEATURE_DFS
516 /*****************************************************************************
517  函 数 名  : hal_radar_config_reg
518 *****************************************************************************/
hal_radar_config_reg(hal_dfs_radar_type_enum_uint8 dfs_domain)519 static INLINE__ osal_void hal_radar_config_reg(hal_dfs_radar_type_enum_uint8 dfs_domain)
520 {
521     hal_public_hook_func(_radar_config_reg)(dfs_domain);
522 }
hal_radar_config_reg_bw(hal_dfs_radar_type_enum_uint8 radar_type,wlan_channel_bandwidth_enum_uint8 bandwidth)523 static INLINE__ osal_void hal_radar_config_reg_bw(hal_dfs_radar_type_enum_uint8 radar_type,
524     wlan_channel_bandwidth_enum_uint8 bandwidth)
525 {
526     hal_public_hook_func(_radar_config_reg_bw)(radar_type, bandwidth);
527 }
hal_radar_enable_chirp_det(oal_bool_enum_uint8 chirp_det)528 static INLINE__ osal_void hal_radar_enable_chirp_det(oal_bool_enum_uint8 chirp_det)
529 {
530     hal_public_hook_func(_radar_enable_chirp_det)(chirp_det);
531 }
532 
533 #endif
534 
hal_set_rf_limit_power(wlan_channel_band_enum_uint8 band,osal_u8 power)535 static INLINE__ osal_void hal_set_rf_limit_power(wlan_channel_band_enum_uint8 band, osal_u8 power)
536 {
537     hal_public_hook_func(_set_rf_limit_power)(band, power);
538 }
539 
540 osal_void  hal_pow_sw_initialize_tx_power(hal_to_dmac_device_stru *hal_device);
541 
hal_pow_set_band_spec_frame_tx_power(hal_to_dmac_device_stru * hal_device,wlan_channel_band_enum_uint8 band,osal_u8 chan_idx)542 static INLINE__ osal_void hal_pow_set_band_spec_frame_tx_power(hal_to_dmac_device_stru *hal_device,
543     wlan_channel_band_enum_uint8 band, osal_u8 chan_idx)
544 {
545     hal_public_hook_func(_pow_set_band_spec_frame_tx_power)(hal_device, band, chan_idx);
546 }
547 
hal_set_resp_pow_level(osal_char near_distance_rssi,osal_char far_distance_rssi)548 static INLINE__ osal_void hal_set_resp_pow_level(osal_char near_distance_rssi, osal_char far_distance_rssi)
549 {
550     hal_public_hook_func(_set_resp_pow_level)(near_distance_rssi, far_distance_rssi);
551 }
552 
553 #ifdef _PRE_WLAN_FEATURE_USER_RESP_POWER
hal_pow_set_user_resp_frame_tx_power(hal_to_dmac_device_stru * hal_device,osal_u8 lut_index,osal_u8 rssi_distance)554 static INLINE__ osal_void  hal_pow_set_user_resp_frame_tx_power(hal_to_dmac_device_stru *hal_device,
555     osal_u8 lut_index, osal_u8 rssi_distance)
556 {
557     hal_public_hook_func(_pow_set_user_resp_frame_tx_power)(hal_device, lut_index, rssi_distance);
558 }
559 #endif
560 
hal_pow_get_spec_frame_data_rate_idx(osal_u8 rate,osal_u8 * rate_idx)561 static INLINE__ osal_void hal_pow_get_spec_frame_data_rate_idx(osal_u8 rate,  osal_u8 *rate_idx)
562 {
563     hal_public_hook_func(_pow_get_spec_frame_data_rate_idx)(rate, rate_idx);
564 }
hal_pow_get_pow_table_tpc_code(osal_u8 band,osal_u8 rate,osal_u8 bw,osal_u8 pwr_lvl)565 static INLINE__ osal_u16 hal_pow_get_pow_table_tpc_code(osal_u8 band, osal_u8 rate, osal_u8 bw, osal_u8 pwr_lvl)
566 {
567     return hal_public_hook_func(_pow_get_pow_table_tpc_code)(band, rate, bw, pwr_lvl);
568 }
569 
hal_pow_get_data_rate_idx(osal_u8 protocol_mode,osal_u8 mcs,wlan_bw_cap_enum_uint8 bw,osal_u8 * rate_idx)570 static INLINE__ osal_void hal_pow_get_data_rate_idx(osal_u8 protocol_mode, osal_u8 mcs, wlan_bw_cap_enum_uint8 bw,
571     osal_u8 *rate_idx)
572 {
573     hal_public_hook_func(_pow_get_data_rate_idx)(protocol_mode, mcs, bw, rate_idx);
574 }
575 
hal_get_tx_vector_word6(osal_void)576 static INLINE__ osal_u32 hal_get_tx_vector_word6(osal_void)
577 {
578     return hal_public_hook_func(_get_tx_vector_word6)();
579 }
hal_get_rpt_tx_data_word0(osal_void)580 static INLINE__ osal_u32 hal_get_rpt_tx_data_word0(osal_void)
581 {
582     return hal_public_hook_func(_get_rpt_tx_data_word0)();
583 }
584 
585 /*
586 输入vap模式,hal创建vap结构,并标记vap id
587 */
hal_add_vap(hal_to_dmac_device_stru * hal_device,wlan_vap_mode_enum_uint8 vap_mode,osal_u8 hal_vap_id,hal_to_dmac_vap_stru ** hal_vap)588 static INLINE__ osal_void hal_add_vap(hal_to_dmac_device_stru * hal_device,
589     wlan_vap_mode_enum_uint8 vap_mode, osal_u8 hal_vap_id, hal_to_dmac_vap_stru ** hal_vap)
590 {
591     hal_public_hook_func(_add_vap)(hal_device, vap_mode, hal_vap_id, hal_vap);
592 }
593 
594 /*
595 输入vap模式,hal删除vap结构,并标记vap id
596 */
hal_del_vap(hal_to_dmac_device_stru * hal_device,osal_u8 vap_id)597 static INLINE__ osal_void hal_del_vap(hal_to_dmac_device_stru * hal_device, osal_u8 vap_id)
598 {
599     hal_public_hook_func(_del_vap)(hal_device, vap_id);
600 }
601 
602 /*****************************************************************************
603  函 数 名  : hal_clear_hw_fifo
604  功能描述  : 清除硬件发送缓冲区
605 *****************************************************************************/
hal_clear_hw_fifo(hal_to_dmac_device_stru * hal_device)606 static INLINE__ osal_void hal_clear_hw_fifo(hal_to_dmac_device_stru *hal_device)
607 {
608     /* disable PA之后、clear TX FIFO之前,增加10us延迟,期望硬件有足够时间回填描述符 */
609     osal_udelay(10);
610     hal_public_hook_func(_clear_hw_fifo)(hal_device);
611 }
612 
613 /*****************************************************************************
614  功能描述  : 屏蔽指定中断
615 *****************************************************************************/
hal_mask_interrupt(osal_u32 offset)616 static INLINE__ osal_void hal_mask_interrupt(osal_u32 offset)
617 {
618     hal_public_hook_func(_mask_interrupt)(offset);
619 }
620 
621 /*****************************************************************************
622  功能描述  : 恢复指定中断
623 *****************************************************************************/
hal_unmask_interrupt(osal_u32 offset)624 static INLINE__ osal_void hal_unmask_interrupt(osal_u32 offset)
625 {
626     hal_public_hook_func(_unmask_interrupt)(offset);
627 }
628 
629 #ifdef _PRE_WLAN_ONLINE_DPD
630 
hal_dpd_cfr_set_bw(hal_to_dmac_device_stru * hal_device,wlan_channel_bandwidth_enum_uint8 bandwidth)631 static INLINE__ osal_void  hal_dpd_cfr_set_bw(hal_to_dmac_device_stru *hal_device,
632     wlan_channel_bandwidth_enum_uint8 bandwidth)
633 {
634     hal_public_hook_func(_dpd_cfr_set_bw)(hal_device, bandwidth);
635 }
636 
hal_dpd_cfr_set_freq(hal_to_dmac_device_stru * hal_device,osal_u8 val)637 static INLINE__ osal_void  hal_dpd_cfr_set_freq(hal_to_dmac_device_stru *hal_device, osal_u8 val)
638 {
639     hal_public_hook_func(_dpd_cfr_set_freq)(hal_device, val);
640 }
641 #endif
642 
643 /*****************************************************************************
644  功能描述  : 将密钥写进硬件寄存器
645 *****************************************************************************/
hal_ce_add_key(hal_security_key_stru * security_key)646 static  INLINE__ osal_void  hal_ce_add_key(hal_security_key_stru *security_key)
647 {
648     hal_public_hook_func(_ce_add_key)(security_key);
649 }
650 
651 /*****************************************************************************
652  功能描述  : 读取cipher key值
653 *****************************************************************************/
hal_ce_get_key(hal_security_key_stru * security_key)654 static  INLINE__ osal_void  hal_ce_get_key(hal_security_key_stru *security_key)
655 {
656     hal_public_hook_func(_ce_get_key)(security_key);
657 }
658 
hal_chan_measure_start(hal_chan_measure_stru * meas)659 static INLINE__ osal_void hal_chan_measure_start(hal_chan_measure_stru *meas)
660 {
661     hal_public_hook_func(_chan_measure_start)(meas);
662 }
663 
664 /*****************************************************************************
665  功能描述  : 读取硬件MAC信道统计寄存器
666 *****************************************************************************/
hal_get_ch_statics_result(hal_ch_statics_irq_event_stru * ch_statics)667 static INLINE__ osal_void hal_get_ch_statics_result(hal_ch_statics_irq_event_stru *ch_statics)
668 {
669     hal_public_hook_func(_get_ch_statics_result)(ch_statics);
670 }
671 
672 /*****************************************************************************
673  函 数 名  : hal_enable_radar_det
674  功能描述  : 设置硬件PHY雷达检测使能位
675 *****************************************************************************/
hal_enable_radar_det(osal_u8 enable)676 static INLINE__ osal_void hal_enable_radar_det(osal_u8 enable)
677 {
678     hal_public_hook_func(_enable_radar_det)(enable);
679 }
680 
681 /*****************************************************************************
682  函 数 名  : hal_get_bcn_rate
683  功能描述  : 获取某个vap的beacon datarate
684 *****************************************************************************/
hal_get_bcn_rate(hal_to_dmac_vap_stru * hal_vap,osal_u8 * data_rate)685 static  INLINE__ osal_void  hal_get_bcn_rate(hal_to_dmac_vap_stru *hal_vap, osal_u8 *data_rate)
686 {
687     hal_public_hook_func(_get_bcn_rate)(hal_vap, data_rate);
688 }
689 
690 /*****************************************************************************
691  函 数 名  : hal_set_bcn_phy_tx_mode
692  功能描述  : 设置beacon帧的txmode
693 *****************************************************************************/
hal_set_bcn_phy_tx_mode(hal_to_dmac_vap_stru * hal_vap,osal_u32 pow_code)694 static  INLINE__ osal_void hal_set_bcn_phy_tx_mode(hal_to_dmac_vap_stru *hal_vap, osal_u32 pow_code)
695 
696 {
697     hal_public_hook_func(_set_bcn_phy_tx_mode)(hal_vap, pow_code);
698 }
699 
700 #ifdef _PRE_WLAN_FEATURE_EDCA_OPT
701 /*****************************************************************************
702  功能描述  : EDCA优化特性下清空部分mac统计寄存器
703 *****************************************************************************/
hal_set_counter1_clear(osal_void)704 static  INLINE__ osal_void hal_set_counter1_clear(osal_void)
705 {
706     hal_public_hook_func(_set_counter1_clear)();
707 }
708 #endif
709 
710 #define HAL_VAP_LEVEL_FUNC
711 /*****************************************************************************
712  函 数 名  : hal_vap_tsf_get_32bit
713  功能描述  : 获取tsf低32位值
714 *****************************************************************************/
hal_vap_tsf_get_32bit(hal_to_dmac_vap_stru * hal_vap,osal_u32 * tsf_lo)715 static INLINE__ osal_void  hal_vap_tsf_get_32bit(hal_to_dmac_vap_stru *hal_vap, osal_u32 *tsf_lo)
716 {
717     hal_public_hook_func(_vap_tsf_get_32bit)(hal_vap, tsf_lo);
718 }
719 
720 /*****************************************************************************
721  函 数 名  : hal_vap_tsf_get_64bit
722  功能描述  : 获取整个tsf 64位值
723 *****************************************************************************/
hal_vap_tsf_get_64bit(const hal_to_dmac_vap_stru * hal_vap,osal_u32 * tsf_high,osal_u32 * tsf_lo)724 static INLINE__ osal_void  hal_vap_tsf_get_64bit(const hal_to_dmac_vap_stru *hal_vap, osal_u32 *tsf_high,
725     osal_u32 *tsf_lo)
726 {
727     hal_public_hook_func(_vap_tsf_get_64bit)(hal_vap, tsf_high, tsf_lo);
728 }
729 
730 /*****************************************************************************
731  函 数 名  : hal_vap_beacon_suspend
732  功能描述  : 挂起beacon帧发送
733 *****************************************************************************/
hal_vap_beacon_suspend(hal_to_dmac_vap_stru * hal_vap)734 static INLINE__ osal_void  hal_vap_beacon_suspend(hal_to_dmac_vap_stru *hal_vap)
735 {
736     hal_public_hook_func(_vap_beacon_suspend)(hal_vap);
737 }
738 
739 /*****************************************************************************
740  函 数 名  : hal_vap_beacon_resume
741  功能描述  : 恢复beacon帧发送
742 *****************************************************************************/
hal_vap_beacon_resume(hal_to_dmac_vap_stru * hal_vap)743 static INLINE__ osal_void  hal_vap_beacon_resume(hal_to_dmac_vap_stru *hal_vap)
744 {
745     hal_public_hook_func(_vap_beacon_resume)(hal_vap);
746 }
747 
748 #ifdef _PRE_WLAN_FEATURE_AMPDU_TX_HW
749 /*****************************************************************************
750  函 数 名  : hal_set_hw_en_reg_cfg
751  功能描述  : 设置硬件聚合需要配置的寄存器
752 *****************************************************************************/
hal_set_hw_en_reg_cfg(osal_u8 hw_en)753 static INLINE__ osal_void hal_set_hw_en_reg_cfg(osal_u8 hw_en)
754 {
755     hal_public_hook_func(_set_hw_en_reg_cfg)(hw_en);
756 }
757 #endif
758 /*****************************************************************************
759   hal vap TSF参数配置相关接口
760 *****************************************************************************/
761 /*****************************************************************************
762  函 数 名  : hal_vap_read_tbtt_timer
763  功能描述  : 读取TBTT计数器
764 *****************************************************************************/
hal_vap_read_tbtt_timer(hal_to_dmac_vap_stru * hal_vap,osal_u32 * value)765 static INLINE__ osal_void  hal_vap_read_tbtt_timer(hal_to_dmac_vap_stru *hal_vap, osal_u32 *value)
766 {
767     hal_public_hook_func(_vap_read_tbtt_timer)(hal_vap, value);
768 }
769 
770 /*****************************************************************************
771  函 数 名  : hal_vap_set_machw_beacon_period
772  功能描述  : 设置vap的Beacon Period
773 *****************************************************************************/
hal_vap_set_machw_beacon_period(hal_to_dmac_vap_stru * hal_vap,osal_u16 beacon_period)774 static INLINE__ osal_void  hal_vap_set_machw_beacon_period(hal_to_dmac_vap_stru *hal_vap, osal_u16 beacon_period)
775 {
776     hal_public_hook_func(_vap_set_machw_beacon_period)(hal_vap, beacon_period);
777 }
778 
779 /*****************************************************************************
780  功能描述  : wlan service 去注册
781 *****************************************************************************/
hal_pm_servid_unregister(osal_void)782 static INLINE__ osal_void hal_pm_servid_unregister(osal_void)
783 {
784     hal_public_hook_func(_pm_servid_unregister)();
785 }
786 
hal_pm_vote2platform(hal_pm_mode_enum_uint8 pm_mode)787 static  INLINE__ osal_void hal_pm_vote2platform(hal_pm_mode_enum_uint8 pm_mode)
788 {
789     hal_public_hook_func(_pm_vote2platform)(pm_mode);
790 }
791 
hal_pm_set_bcn_rf_chain(hal_to_dmac_vap_stru * hal_vap,osal_u8 bcn_rf_chain)792 static INLINE__ osal_void hal_pm_set_bcn_rf_chain(hal_to_dmac_vap_stru *hal_vap, osal_u8 bcn_rf_chain)
793 {
794     hal_public_hook_func(_pm_set_bcn_rf_chain)(hal_vap, bcn_rf_chain);
795 }
796 
797 /*****************************************************************************
798  函 数 名  : hal_enable_tsf_tbtt
799  功能描述  : 打开tsf tbtt中断
800 *****************************************************************************/
hal_enable_tsf_tbtt(hal_to_dmac_vap_stru * hal_vap,oal_bool_enum_uint8 dbac_enable)801 static  INLINE__ osal_void hal_enable_tsf_tbtt(hal_to_dmac_vap_stru *hal_vap, oal_bool_enum_uint8 dbac_enable)
802 {
803     hal_public_hook_func(_enable_tsf_tbtt)(hal_vap, dbac_enable);
804 }
805 
806 /*****************************************************************************
807  功能描述  : 发送单音信号
808 *****************************************************************************/
809 
810 /*****************************************************************************
811  函 数 名  : hal_vap_get_gtk_rx_lut_idx
812  功能描述  : hal vap获取lut idx
813 *****************************************************************************/
hal_vap_get_gtk_rx_lut_idx(hal_to_dmac_vap_stru * hal_vap,osal_u8 * lut_idx)814 static INLINE__ osal_void  hal_vap_get_gtk_rx_lut_idx(hal_to_dmac_vap_stru *hal_vap, osal_u8 *lut_idx)
815 {
816     hal_public_hook_func(_vap_get_gtk_rx_lut_idx)(hal_vap, lut_idx);
817 }
818 
819 #ifdef _PRE_WLAN_FEATURE_M2S
hal_update_datarate_by_chain(hal_to_dmac_device_stru * hal_device,osal_u8 resp_tx_chain)820 static INLINE__ osal_void hal_update_datarate_by_chain(hal_to_dmac_device_stru *hal_device, osal_u8 resp_tx_chain)
821 {
822     hal_public_hook_func(_update_datarate_by_chain)(hal_device, resp_tx_chain);
823 }
824 
825 /*****************************************************************************
826  功能描述  : 获取he rom里指示的nss
827 *****************************************************************************/
hal_get_reg_he_rom_nss(osal_u32 * peer_rom_nss)828 static INLINE__ osal_void hal_get_reg_he_rom_nss(osal_u32 *peer_rom_nss)
829 {
830     hal_public_hook_func(_get_reg_he_rom_nss)(peer_rom_nss);
831 }
832 #endif
833 
834 
835 #ifdef _PRE_WLAN_FEATURE_FTM
836 /*****************************************************************************
837  函 数 名  : hal_get_ftm_time
838  功能描述  : 获取ftm time
839 *****************************************************************************/
hal_get_ftm_time(osal_u64 time)840 static INLINE__ osal_u64  hal_get_ftm_time(osal_u64 time)
841 {
842     return hal_public_hook_func(_get_ftm_time)(time);
843 }
844 
845 /*****************************************************************************
846  函 数 名  : hal_check_ftm_t4
847  功能描述  : 检查ftm time
848 *****************************************************************************/
hal_check_ftm_t4(osal_u64 time)849 static INLINE__ osal_u64  hal_check_ftm_t4(osal_u64 time)
850 {
851     return hal_public_hook_func(_check_ftm_t4)(time);
852 }
853 
854 /*****************************************************************************
855  函 数 名  : hal_check_ftm_t4
856  功能描述  : 检查ftm time
857 *****************************************************************************/
hal_get_ftm_t4_intp(osal_u64 time)858 static INLINE__ osal_char  hal_get_ftm_t4_intp(osal_u64 time)
859 {
860     return hal_public_hook_func(_get_ftm_t4_intp)(time);
861 }
862 
863 /*****************************************************************************
864  函 数 名  : hal_check_ftm_t2
865  功能描述  : 检查ftm time
866 *****************************************************************************/
hal_check_ftm_t2(osal_u64 time)867 static INLINE__ osal_u64  hal_check_ftm_t2(osal_u64 time)
868 {
869     return hal_public_hook_func(_check_ftm_t2)(time);
870 }
871 
872 /*****************************************************************************
873  函 数 名  : hal_check_ftm_t4
874  功能描述  : 检查ftm time
875 *****************************************************************************/
hal_get_ftm_t2_intp(osal_u64 time)876 static INLINE__ osal_char  hal_get_ftm_t2_intp(osal_u64 time)
877 {
878     return hal_public_hook_func(_get_ftm_t2_intp)(time);
879 }
880 
881 /*****************************************************************************
882  功能描述  : 设置ftm  总开关
883 *****************************************************************************/
hal_set_ftm_enable(oal_bool_enum_uint8 ftm_status)884 static INLINE__ osal_void hal_set_ftm_enable(oal_bool_enum_uint8 ftm_status)
885 {
886     hal_public_hook_func(_set_ftm_enable)(ftm_status);
887 }
888 
889 /*****************************************************************************
890  功能描述  : 设置ftm  initiator
891 *****************************************************************************/
hal_set_ftm_sample(oal_bool_enum_uint8 ftm_status)892 static INLINE__ osal_void hal_set_ftm_sample(oal_bool_enum_uint8 ftm_status)
893 {
894     hal_public_hook_func(_set_ftm_sample)(ftm_status);
895 }
896 
897 /*****************************************************************************
898  功能描述  : 设置ftm  responser
899 *****************************************************************************/
hal_set_ftm_ctrl_status(oal_bool_enum_uint8 ftm_status)900 static INLINE__ osal_void hal_set_ftm_ctrl_status(oal_bool_enum_uint8 ftm_status)
901 {
902     hal_public_hook_func(_set_ftm_ctrl_status)(ftm_status);
903 }
904 
905 /*****************************************************************************
906  函 数 名  : hal_get_ftm_cali_rx_time
907 *****************************************************************************/
hal_get_ftm_cali_rx_time(osal_u32 * ftm_cali_rx_time)908 static INLINE__ osal_void hal_get_ftm_cali_rx_time(osal_u32 *ftm_cali_rx_time)
909 {
910     hal_public_hook_func(_get_ftm_cali_rx_time)(ftm_cali_rx_time);
911 }
912 
913 /*****************************************************************************
914  函 数 名  : hal_get_ftm_cali_rx_intp_time
915 *****************************************************************************/
hal_get_ftm_cali_rx_intp_time(osal_u32 * ftm_cali_rx_intp_time)916 static INLINE__ osal_void hal_get_ftm_cali_rx_intp_time(osal_u32 *ftm_cali_rx_intp_time)
917 {
918     hal_public_hook_func(_get_ftm_cali_rx_intp_time)(ftm_cali_rx_intp_time);
919 }
920 
921 /*****************************************************************************
922  函 数 名  : hal_get_ftm_cali_tx_time
923 *****************************************************************************/
924 osal_void hal_get_ftm_cali_tx_time(osal_u32 *ftm_cali_tx_time);
925 
926 /*****************************************************************************
927  函 数 名  : hal_set_ftm_cali
928  功能描述  : 设置ftm  环回
929 *****************************************************************************/
930 osal_void hal_set_ftm_cali(hal_to_dmac_device_stru *hal_device,
931     hal_tx_dscr_stru *tx_dscr, oal_bool_enum_uint8 ftm_cali);
932 
933 /*****************************************************************************
934  函 数 名  : hal_set_ftm_tx_cnt
935  功能描述  : 设置FTM帧 硬件重传次数
936 *****************************************************************************/
937 osal_void hal_set_ftm_tx_cnt(hal_tx_dscr_stru *tx_dscr, osal_u8 ftm_tx_cnt);
938 
939 /*****************************************************************************
940  函 数 名  : hal_set_ftm_bandwidth
941  功能描述  : 设置发送描述符中的tx_desc_freq_bandwidth_mode
942 *****************************************************************************/
943 osal_void hal_set_ftm_bandwidth(hal_tx_dscr_stru *tx_dscr, wlan_bw_cap_enum_uint8 band_cap);
944 
945 /*****************************************************************************
946  函 数 名  : hal_set_ftm_protocol
947 *****************************************************************************/
948 osal_void hal_set_ftm_protocol(hal_tx_dscr_stru *tx_dscr, wlan_phy_protocol_enum_uint8 prot_format);
949 
950 /*****************************************************************************
951  函 数 名  : hal_set_ftm_m2s
952 *****************************************************************************/
953 osal_void hal_set_ftm_m2s(hal_tx_dscr_stru *tx_dscr, osal_u8 tx_chain_selection);
954 
955 /*****************************************************************************
956  函 数 名  : hal_get_ftm_rtp_reg
957 *****************************************************************************/
958 osal_void hal_get_ftm_rtp_reg(osal_u32 *reg0, osal_u32 *reg1, osal_u32 *reg2, osal_u32 *reg3, osal_u32 *reg4);
959 
960 /*****************************************************************************
961  函 数 名  : hal_set_ftm_m2s_phy
962 *****************************************************************************/
963 osal_void hal_set_ftm_m2s_phy(  oal_bool_enum_uint8 is_mimo, osal_u8 tx_chain_selection);
964 
965 /*****************************************************************************
966  函 数 名  : hal_get_ftm_intp_status
967  功能描述  : 获取ftm intp开关状态
968 *****************************************************************************/
969 osal_void hal_get_ftm_intp_status(osal_u32 *ftm_status);
970 
971 /*****************************************************************************
972  函 数 名  : hal_get_ftm_new_status
973  功能描述  : 获取ftm 同步特性开关状态
974 *****************************************************************************/
975 osal_void hal_get_ftm_new_status(osal_u32 *ftm_status);
976 
977 /*****************************************************************************
978  函 数 名  : hal_get_ftm_cnt_status
979  功能描述  : 获取ftm 计数器开关状态
980 *****************************************************************************/
981 osal_void hal_get_ftm_cnt_status(osal_u32 *ftm_status);
982 
983 /*****************************************************************************
984  函 数 名  : hal_get_ftm_pluse_enabne_status
985  功能描述  : 获取ftm 脉冲开关状态
986 *****************************************************************************/
987 osal_void hal_get_ftm_pulse_enable_status(osal_u32 *ftm_status);
988 
989 /*****************************************************************************
990  函 数 名  : hal_get_ftm_crystal_oscillator_offset_update_status
991  功能描述  : 获取ftm 更新晶振偏差开关状态
992 *****************************************************************************/
993 osal_void hal_get_ftm_crystal_oscillator_offset_update_status(osal_u32 *ftm_status);
994 
995 /*****************************************************************************
996  函 数 名  : hal_get_ftm_clock_offset_update_status
997  功能描述  : 获取ftm 更新时钟偏差开关状态
998 *****************************************************************************/
999 osal_void hal_get_ftm_clock_offset_update_status(osal_u32 *ftm_status);
1000 
1001 /*****************************************************************************
1002  功能描述  : 获取FTM时钟频率
1003 *****************************************************************************/
1004 osal_void hal_get_ftm_phy_bw_mode(osal_u32 *ftm_status);
1005 
1006 /*****************************************************************************
1007  功能描述  : 获取FTM 插值上报频率
1008 *****************************************************************************/
1009 osal_void hal_get_ftm_intp_freq(osal_u32 *ftm_status);
1010 
1011 /*****************************************************************************
1012  函 数 名  : hal_get_ftm_pulse_offset
1013  功能描述  : 获取ftm脉冲偏差值
1014 *****************************************************************************/
1015 osal_u64 hal_get_ftm_pulse_offset(osal_void);
1016 
1017 /*****************************************************************************
1018  函 数 名  : hal_get_ftm_pulse_freq
1019  功能描述  : 获取ftm脉冲周期值
1020 *****************************************************************************/
1021 osal_u64 hal_get_ftm_pulse_freq(osal_void);
1022 
1023 /*****************************************************************************
1024  函 数 名  : hal_get_ftm_crystal_oscillator_offset
1025  功能描述  : 获取ftm晶振偏差值
1026 *****************************************************************************/
1027 osal_u32 hal_get_ftm_crystal_oscillator_offset(osal_void);
1028 
1029 /*****************************************************************************
1030  函 数 名  : hal_get_ftm_clock_offset
1031  功能描述  : 获取ftm时钟偏差值
1032 *****************************************************************************/
1033 osal_u64 hal_get_ftm_clock_offset(osal_void);
1034 
1035 /*****************************************************************************
1036  函 数 名  : hal_set_ftm_new_status
1037  功能描述  : 设置ftm 同步特性开关状态
1038 *****************************************************************************/
hal_set_ftm_new_status(osal_u32 ftm_status)1039 static INLINE__ osal_void hal_set_ftm_new_status(osal_u32 ftm_status)
1040 {
1041     hal_public_hook_func(_set_ftm_intp_status)(ftm_status);
1042 }
1043 
1044 /*****************************************************************************
1045  函 数 名  : hal_set_ftm_new_status
1046  功能描述  : 设置ftm 同步计数步长复位状态
1047 *****************************************************************************/
1048 osal_void hal_set_ftm_step_count_status(osal_u32 ftm_status);
1049 
1050 /*****************************************************************************
1051  函 数 名  : hal_set_ftm_cnt_status
1052  功能描述  : 设置ftm 计数器开关状态
1053 *****************************************************************************/
1054 osal_void hal_set_ftm_cnt_status(osal_u32 ftm_status);
1055 
1056 /*****************************************************************************
1057  函 数 名  : hal_set_ftm_crystal_oscillator_offset_update_status
1058  功能描述  : 设置ftm 更新晶振偏差开关状态
1059 *****************************************************************************/
1060 osal_void hal_set_ftm_crystal_oscillator_offset_update_status(osal_u32 ftm_status);
1061 
1062 /*****************************************************************************
1063  函 数 名  : hal_set_ftm_clock_offset_update_status
1064  功能描述  : 设置ftm 更新时钟偏差开关状态
1065 *****************************************************************************/
hal_set_ftm_clock_offset_update_status(osal_u32 ftm_status)1066 static INLINE__ osal_void hal_set_ftm_clock_offset_update_status(osal_u32 ftm_status)
1067 {
1068     hal_public_hook_func(_set_ftm_clock_offset_update_status)(ftm_status);
1069 }
1070 
1071 /*****************************************************************************
1072  函 数 名  : hal_set_ftm_crystal_oscillator_offset
1073  功能描述  : 设置ftm晶振偏差值
1074 *****************************************************************************/
1075 osal_void hal_set_ftm_crystal_oscillator_offset(osal_u32 time);
1076 
1077 /*****************************************************************************
1078  函 数 名  : hal_set_ftm_clock_offset
1079  功能描述  : 设置ftm时钟偏差值
1080 *****************************************************************************/
1081 osal_void hal_set_ftm_clock_offset(osal_u64 time);
1082 
1083 /*****************************************************************************
1084  函 数 名  : hal_sat_crystal_oscillator_offset
1085  功能描述  : 晶振偏差处理
1086 *****************************************************************************/
1087 osal_s64 hal_sat_crystal_oscillator_offset(osal_s64 clock_offset, osal_s64 delta);
1088 /*****************************************************************************
1089  功能描述  : hal_get_rx_digital_scaling_bypass
1090 *****************************************************************************/
1091 osal_void hal_get_rx_digital_scaling_bypass(osal_u32 *bypass);
1092 /*****************************************************************************
1093  功能描述  : hal_get_rx_lpf1_bypass
1094 *****************************************************************************/
1095 osal_void hal_get_rx_lpf1_bypass(osal_u32 *bypass);
1096 /*****************************************************************************
1097  功能描述  : hal_get_rxiq_filter_force_bypass
1098 *****************************************************************************/
1099 osal_void hal_get_rxiq_filter_force_bypass(osal_u32 *bypass);
1100 
1101 #endif
1102 
1103 osal_void hal_flush_tx_complete_irq(hal_to_dmac_device_stru *hal_dev);
1104 
1105 /*****************************************************************************
1106  功能描述  : FPGA单板根据协议模式配置phy的11ax ctl位
1107 *****************************************************************************/
1108 osal_void hal_set_ax_ctl_by_protocol(wlan_protocol_enum_uint8 protocol);
1109 
1110 /************************************ *****************************************
1111  功能描述  : 用户功率信息初始化
1112 *****************************************************************************/
1113 osal_void  hal_device_init_vap_pow_code(hal_to_dmac_device_stru *hal_device,
1114     hal_vap_pow_info_stru *vap_pow_info, hal_pow_set_type_enum_uint8 type, const mac_channel_stru *channel);
1115 
1116 /************************************ *****************************************
1117  功能描述  : 校准维测信息
1118 *****************************************************************************/
1119 osal_u32 hal_gp_get_mpdu_count(osal_void);
1120 osal_u32 hal_gp_get_dbac_vap_stop_bitmap(osal_void);
1121 osal_void hal_gp_set_dbac_vap_stop_bitmap(osal_u32 val);
1122 osal_void hal_gp_clear_dbac_vap_stop_bitmap(osal_void);
1123 
1124 /* 设置除基本信息外的所有其他描述符字段 */
hal_tx_ucast_data_set_dscr(hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr,hal_tx_txop_feature_stru * txop_feature,hal_tx_txop_alg_stru * txop_alg,hal_tx_ppdu_feature_stru * ppdu_feature)1125 static INLINE__ osal_void hal_tx_ucast_data_set_dscr(hal_to_dmac_device_stru *hal_device,
1126     hal_tx_dscr_stru *tx_dscr, hal_tx_txop_feature_stru *txop_feature,
1127     hal_tx_txop_alg_stru *txop_alg, hal_tx_ppdu_feature_stru *ppdu_feature)
1128 {
1129     hal_public_hook_func(_tx_ucast_data_set_dscr)(hal_device, tx_dscr, txop_feature, txop_alg, ppdu_feature);
1130 }
1131 /*****************************************************************************
1132  函 数 名  : hal_vap_get_machw_txop_limit_vivo
1133  功能描述  : 获取VI、VO的TXOP上限(单位: 微秒)
1134 *****************************************************************************/
hal_vap_get_machw_txop_limit_ac(osal_u8 ac,osal_u16 * txop)1135 static INLINE__ osal_void  hal_vap_get_machw_txop_limit_ac(osal_u8 ac, osal_u16 *txop)
1136 {
1137     hal_public_hook_func(_vap_get_machw_txop_limit_ac)(ac, txop);
1138 }
1139 #endif     //   #ifndef _PRE_WLAN_FEATURE_WS63
1140 osal_u32 hal_gp_get_sdp_chnl_switch_off(osal_void);
1141 osal_u32 hal_gp_get_slp_tx_ctrl(osal_void);
1142 
1143 #ifdef _PRE_WLAN_FEATURE_CCA_OPT
1144 /*****************************************************************************
1145  函 数 名  : hal_set_ed_high_th
1146  功能描述  : CCA优化下设置cca的20/40M检测门限
1147 *****************************************************************************/
hal_set_ed_high_th(osal_s8 ed_high_20_reg_val,osal_s8 ed_high_40_reg_val,oal_bool_enum_uint8 is_default_th)1148 static  INLINE__ osal_void hal_set_ed_high_th(osal_s8 ed_high_20_reg_val, osal_s8 ed_high_40_reg_val,
1149     oal_bool_enum_uint8 is_default_th)
1150 {
1151     hal_public_hook_func(_set_ed_high_th)(ed_high_20_reg_val, ed_high_40_reg_val, is_default_th);
1152 }
1153 
hal_set_cca_prot_th(osal_s8 sd_cca_20th_dsss_val,osal_s8 sd_cca_20th_ofdm_val)1154 static  INLINE__ osal_void hal_set_cca_prot_th(osal_s8 sd_cca_20th_dsss_val, osal_s8 sd_cca_20th_ofdm_val)
1155 {
1156     hal_public_hook_func(_set_cca_prot_th)(sd_cca_20th_dsss_val, sd_cca_20th_ofdm_val);
1157 }
1158 
1159 /*****************************************************************************
1160  函 数 名  : hal_enable_sync_error_counter
1161  功能描述  : CCA优化特性下使能sync error统计寄存器
1162 *****************************************************************************/
hal_enable_sync_error_counter(osal_s32 enable_cnt_reg_val)1163 static  INLINE__ osal_void hal_enable_sync_error_counter(osal_s32 enable_cnt_reg_val)
1164 {
1165     hal_public_hook_func(_enable_sync_error_counter)(enable_cnt_reg_val);
1166 }
1167 
1168 /*****************************************************************************
1169  函 数 名  : hal_get_sync_error_cnt
1170  功能描述  : CCA优化特性下获取sync error的统计计数值
1171 *****************************************************************************/
hal_get_sync_error_cnt(osal_u32 * reg_val)1172 static  INLINE__ osal_void hal_get_sync_error_cnt(osal_u32 *reg_val)
1173 {
1174     hal_public_hook_func(_get_sync_error_cnt)(reg_val);
1175 }
1176 
1177 /*****************************************************************************
1178  函 数 名  : hal_set_sync_err_counter_clear
1179  功能描述  : CCA优化特性下清空sync error统计寄存器
1180 *****************************************************************************/
hal_set_sync_err_counter_clear(osal_void)1181 static  INLINE__ osal_void hal_set_sync_err_counter_clear(osal_void)
1182 {
1183     hal_public_hook_func(_set_sync_err_counter_clear)();
1184 }
1185 #endif
1186 
1187 #ifdef _PRE_WLAN_FEATURE_TEMP_PROTECT
1188 /*****************************************************************************
1189  函 数 名  : hal_read_max_temperature
1190  功能描述  : 读取硬件MAC信道统计寄存器
1191 *****************************************************************************/
hal_read_max_temperature(osal_s16 * ps_temperature)1192 static INLINE__ osal_u32 hal_read_max_temperature(osal_s16 *ps_temperature)
1193 {
1194     return hal_public_hook_func(_read_max_temperature)(ps_temperature);
1195 }
1196 
1197 #ifdef _PRE_WLAN_FEATURE_TEMP_PROTECT_CLDO_MODE
1198 /*****************************************************************************
1199  函 数 名  : hal_chip_is_cldo_mode
1200  功能描述  : 读取芯片是否为CLDO模式
1201 *****************************************************************************/
hal_chip_is_cldo_mode(osal_void)1202 static INLINE__ oal_bool_enum_uint8 hal_chip_is_cldo_mode(osal_void)
1203 {
1204     return hal_public_hook_func(_chip_is_cldo_mode)();
1205 }
1206 #endif
1207 #endif
1208 
1209 #ifdef _PRE_PM_TBTT_OFFSET_PROBE
hal_tbtt_offset_probe_init(hal_to_dmac_vap_stru * hal_vap)1210 static INLINE__ osal_void hal_tbtt_offset_probe_init(hal_to_dmac_vap_stru *hal_vap)
1211 {
1212     hal_public_hook_func(_tbtt_offset_probe_init)(hal_vap);
1213 }
1214 #endif
1215 
1216 /*****************************************************************************
1217  函 数 名  : hal_tx_get_dscr_msdu_num
1218  功能描述  : 获取描述符中的msdunum
1219 *****************************************************************************/
hal_tx_get_dscr_msdu_num(hal_tx_dscr_stru * tx_dscr,osal_u16 * msdu_num)1220 static INLINE__ osal_void  hal_tx_get_dscr_msdu_num(hal_tx_dscr_stru *tx_dscr, osal_u16 *msdu_num)
1221 {
1222     hal_public_hook_func(_tx_get_dscr_msdu_num)(tx_dscr, msdu_num);
1223 }
1224 
1225 /*****************************************************************************
1226  功能描述  : 配置long/short slottime
1227 *****************************************************************************/
hal_cfg_slottime_type(osal_u32 slottime_type)1228 static INLINE__ osal_void hal_cfg_slottime_type(osal_u32 slottime_type)
1229 {
1230     hal_public_hook_func(_cfg_slottime_type)(slottime_type);
1231 }
1232 
1233 /*****************************************************************************
1234  功能描述  : 设置次信道带宽
1235 *****************************************************************************/
hal_set_sec_bandwidth_offset(osal_u8 bandwidth)1236 static INLINE__ osal_void hal_set_sec_bandwidth_offset(osal_u8 bandwidth)
1237 {
1238     hal_public_hook_func(_set_sec_bandwidth_offset)(bandwidth);
1239 }
1240 
1241 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
1242 /*****************************************************************************
1243  函 数 名  : hal_config_custom_rf
1244  功能描述  : 更新rf定制化参数
1245 *****************************************************************************/
hal_config_custom_rf(const osal_u8 * param)1246 static INLINE__ osal_void hal_config_custom_rf(const osal_u8 *param)
1247 {
1248     hal_public_hook_func(_config_custom_rf)(param);
1249 }
1250 
1251 /*****************************************************************************
1252  函 数 名  : hal_config_rssi_for_loss
1253  功能描述  : 设置RSSI插损值
1254 *****************************************************************************/
hal_config_rssi_for_loss(osal_u8 chanel_num,osal_s8 * rssi)1255 static INLINE__ osal_void hal_config_rssi_for_loss(osal_u8 chanel_num, osal_s8 *rssi)
1256 {
1257     hal_public_hook_func(_config_rssi_for_loss)(chanel_num, rssi);
1258 }
1259 
hal_config_get_cus_cca_param(hal_cfg_custom_cca_stru ** cfg_cca)1260 static INLINE__ osal_void hal_config_get_cus_cca_param(hal_cfg_custom_cca_stru **cfg_cca)
1261 {
1262     hal_public_hook_func(_config_get_cus_cca_param)(cfg_cca);
1263 }
hal_set_custom_rx_insert_loss(osal_u8 band,osal_u8 * insert_loss,osal_u8 len)1264 static INLINE__ osal_void hal_set_custom_rx_insert_loss(osal_u8 band, osal_u8 *insert_loss, osal_u8 len)
1265 {
1266     hal_public_hook_func(_set_custom_rx_insert_loss)(band, insert_loss, len);
1267 }
hal_get_custom_rx_insert_loss(osal_u8 band,osal_u8 ch_idx)1268 static INLINE__ osal_u8 hal_get_custom_rx_insert_loss(osal_u8 band, osal_u8 ch_idx)
1269 {
1270     return hal_public_hook_func(_get_custom_rx_insert_loss)(band, ch_idx);
1271 }
hal_set_custom_power(osal_u8 band,osal_u8 * power,osal_u16 len)1272 static INLINE__ osal_void hal_set_custom_power(osal_u8 band, osal_u8 *power, osal_u16 len)
1273 {
1274     hal_public_hook_func(_set_custom_power)(band, power, len);
1275 }
1276 #endif // #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
hal_get_rf_subband_idx(osal_u8 band,osal_u8 ch_idx)1277 static  INLINE__ osal_u8 hal_get_rf_subband_idx(osal_u8 band, osal_u8 ch_idx)
1278 {
1279     return hal_public_hook_func(_get_rf_subband_idx)(band, ch_idx);
1280 }
1281 /*****************************************************************************
1282  功能描述  : 将密钥写进硬件寄存器
1283 *****************************************************************************/
hal_ce_del_key(hal_security_key_stru * security_key)1284 static INLINE__ osal_void hal_ce_del_key(hal_security_key_stru *security_key)
1285 {
1286     hal_public_hook_func(_ce_del_key)(security_key);
1287 }
1288 
1289 /*****************************************************************************
1290  函 数 名  : hal_disable_tsf_tbtt
1291  功能描述  : 关闭tsf tbtt中断
1292 *****************************************************************************/
hal_disable_tsf_tbtt(const hal_to_dmac_vap_stru * hal_vap)1293 static  INLINE__ osal_void hal_disable_tsf_tbtt(const hal_to_dmac_vap_stru *hal_vap)
1294 {
1295     hal_public_hook_func(_disable_tsf_tbtt)(hal_vap);
1296 }
1297 
hal_get_auto_adjust_freq_pps(osal_void)1298 static INLINE__ hmac_pps_value_stru hal_get_auto_adjust_freq_pps(osal_void)
1299 {
1300     return hal_public_hook_func(_get_auto_adjust_freq_pps)();
1301 }
1302 
hal_tx_init_dscr_queue(hal_to_dmac_device_stru * device)1303 static INLINE__ osal_void hal_tx_init_dscr_queue(hal_to_dmac_device_stru *device)
1304 {
1305     hal_public_hook_func(_tx_init_dscr_queue)(device);
1306 }
1307 
1308 /*****************************************************************************
1309  函 数 名  : hal_get_tx_q_status
1310  功能描述  : 获取发送队列状态
1311 *****************************************************************************/
hal_set_bcn_timeout_multi_q_enable(hal_to_dmac_vap_stru * hal_vap,osal_u8 enable)1312 static INLINE__ osal_void hal_set_bcn_timeout_multi_q_enable(hal_to_dmac_vap_stru * hal_vap, osal_u8 enable)
1313 {
1314     hal_public_hook_func(_set_bcn_timeout_multi_q_enable)(hal_vap, enable);
1315 }
1316 
hal_get_sr_info(osal_u8 param)1317 static inline osal_void hal_get_sr_info(osal_u8 param)
1318 {
1319     hal_public_hook_func(_get_sr_info)(param);
1320 }
1321 
hal_set_psr_vfs_get(dmac_sr_sta_vfs_stru * hmac_sr_sta_vfs)1322 static inline osal_void hal_set_psr_vfs_get(dmac_sr_sta_vfs_stru *hmac_sr_sta_vfs)
1323 {
1324     hal_public_hook_func(_set_psr_vfs_get)(hmac_sr_sta_vfs);
1325 }
1326 
hal_set_sr_vfs_get(dmac_sr_sta_vfs_stru * hmac_sr_sta_vfs)1327 static inline osal_void hal_set_sr_vfs_get(dmac_sr_sta_vfs_stru *hmac_sr_sta_vfs)
1328 {
1329     hal_public_hook_func(_set_sr_vfs_get)(hmac_sr_sta_vfs);
1330 }
1331 
hal_set_sr_statistics_get(dmac_sr_sta_srg_stru * sr_sta_srg,dmac_sr_sta_non_srg_stru * sr_sta_non_srg)1332 static inline osal_void hal_set_sr_statistics_get(dmac_sr_sta_srg_stru *sr_sta_srg,
1333     dmac_sr_sta_non_srg_stru *sr_sta_non_srg)
1334 {
1335     hal_public_hook_func(_set_sr_statistics_get)(sr_sta_srg, sr_sta_non_srg);
1336 }
1337 
hal_set_psr_statistics_end(osal_void)1338 static inline osal_void hal_set_psr_statistics_end(osal_void)
1339 {
1340     hal_public_hook_func(_set_psr_statistics_end)();
1341 }
1342 
hal_set_sr_vfs_end(osal_void)1343 static inline osal_void hal_set_sr_vfs_end(osal_void)
1344 {
1345     hal_public_hook_func(_set_sr_vfs_end)();
1346 }
1347 
hal_set_sr_statistics_end(osal_void)1348 static inline osal_void hal_set_sr_statistics_end(osal_void)
1349 {
1350     hal_public_hook_func(_set_sr_statistics_end)();
1351 }
1352 
hal_set_psr_statistics_start(osal_void)1353 static inline osal_void hal_set_psr_statistics_start(osal_void)
1354 {
1355     hal_public_hook_func(_set_psr_statistics_start)();
1356 }
1357 
hal_set_sr_vfs_start(osal_void)1358 static inline osal_void hal_set_sr_vfs_start(osal_void)
1359 {
1360     hal_public_hook_func(_set_sr_vfs_start)();
1361 }
1362 
hal_set_sr_statistics_start(osal_void)1363 static inline osal_void hal_set_sr_statistics_start(osal_void)
1364 {
1365     hal_public_hook_func(_set_sr_statistics_start)();
1366 }
1367 
hal_set_psr_statistics_continue(osal_void)1368 static inline osal_void hal_set_psr_statistics_continue(osal_void)
1369 {
1370     hal_public_hook_func(_set_psr_statistics_continue)();
1371 }
1372 
hal_set_sr_statistics_continue(osal_void)1373 static inline osal_void hal_set_sr_statistics_continue(osal_void)
1374 {
1375     hal_public_hook_func(_set_sr_statistics_continue)();
1376 }
hal_set_psr_statistics_stop(osal_void)1377 static inline osal_void hal_set_psr_statistics_stop(osal_void)
1378 {
1379     hal_public_hook_func(_set_psr_statistics_stop)();
1380 }
1381 
hal_set_sr_statistics_stop(osal_void)1382 static inline osal_void hal_set_sr_statistics_stop(osal_void)
1383 {
1384     hal_public_hook_func(_set_sr_statistics_stop)();
1385 }
1386 
hal_set_psr_statistics_clear(osal_void)1387 static inline osal_void hal_set_psr_statistics_clear(osal_void)
1388 {
1389     hal_public_hook_func(_set_psr_statistics_clear)();
1390 }
1391 
hal_set_sr_vfs_clear(osal_void)1392 static inline osal_void hal_set_sr_vfs_clear(osal_void)
1393 {
1394     hal_public_hook_func(_set_sr_vfs_clear)();
1395 }
1396 
hal_set_sr_statistics_clear(osal_void)1397 static inline osal_void hal_set_sr_statistics_clear(osal_void)
1398 {
1399     hal_public_hook_func(_set_sr_statistics_clear)();
1400 }
1401 
hal_set_psr_ctrl(oal_bool_enum_uint8 flag)1402 static INLINE__ osal_void hal_set_psr_ctrl(oal_bool_enum_uint8 flag)
1403 {
1404     hal_public_hook_func(_set_psr_ctrl)(flag);
1405 }
1406 
hal_set_psrt_htc(osal_void)1407 static INLINE__ osal_void hal_set_psrt_htc(osal_void)
1408 {
1409     hal_public_hook_func(_set_psrt_htc)();
1410 }
1411 
hal_set_psr_offset(osal_s32 offset)1412 static INLINE__ osal_void hal_set_psr_offset(osal_s32 offset)
1413 {
1414     hal_public_hook_func(_set_psr_offset)(offset);
1415 }
1416 
hal_set_srg_pd_etc(osal_u32 pd,osal_u32 pw)1417 static INLINE__ osal_void hal_set_srg_pd_etc(osal_u32 pd, osal_u32 pw)
1418 {
1419     hal_public_hook_func(_set_srg_pd_etc)(pd, pw);
1420 }
1421 
hal_set_non_pd(osal_u32 pd,osal_u32 pw)1422 static INLINE__ osal_void hal_set_non_pd(osal_u32 pd, osal_u32 pw)
1423 {
1424     hal_public_hook_func(_set_non_pd)(pd, pw);
1425 }
1426 
hal_set_srg_ctrl(osal_void)1427 static INLINE__ osal_void hal_set_srg_ctrl(osal_void)
1428 {
1429     hal_public_hook_func(_set_srg_ctrl)();
1430 }
1431 
hal_set_srg_partial_bssid_bitmap(osal_u32 bitmap_low,osal_u32 bitmap_high)1432 static INLINE__ osal_void hal_set_srg_partial_bssid_bitmap(osal_u32 bitmap_low, osal_u32 bitmap_high)
1433 {
1434     hal_public_hook_func(_set_srg_partial_bssid_bitmap)(bitmap_low, bitmap_high);
1435 }
1436 
hal_set_srg_bss_color_bitmap(osal_u32 bitmap_low,osal_u32 bitmap_high)1437 static INLINE__ osal_void hal_set_srg_bss_color_bitmap(osal_u32 bitmap_low, osal_u32 bitmap_high)
1438 {
1439     hal_public_hook_func(_set_srg_bss_color_bitmap)(bitmap_low, bitmap_high);
1440 }
1441 #ifdef _PRE_WLAN_FEATURE_BSRP
1442 /*****************************************************************************
1443  功能描述  : 设置NFRP反馈的buff状态
1444 *****************************************************************************/
hal_set_ndp_status(osal_u8 status)1445 static INLINE__ osal_void hal_set_ndp_status(osal_u8 status)
1446 {
1447     hal_public_hook_func(_set_ndp_status)(status);
1448 }
1449 #endif
1450 
hal_set_srg_ele_off(osal_void)1451 static INLINE__ osal_void hal_set_srg_ele_off(osal_void)
1452 {
1453     hal_public_hook_func(_set_srg_ele_off)();
1454 }
1455 
hal_set_sr_ctrl(oal_bool_enum_uint8 flag)1456 static INLINE__ osal_void hal_set_sr_ctrl(oal_bool_enum_uint8 flag)
1457 {
1458     hal_public_hook_func(_set_sr_ctrl)(flag);
1459 }
1460 
hal_color_rpt_clr(osal_void)1461 static inline osal_void hal_color_rpt_clr(osal_void)
1462 {
1463     hal_public_hook_func(_color_rpt_clr)();
1464 }
1465 
hal_color_rpt_en(oal_bool_enum_uint8 flag)1466 static inline osal_void hal_color_rpt_en(oal_bool_enum_uint8 flag)
1467 {
1468     hal_public_hook_func(_color_rpt_en)(flag);
1469 }
1470 
hal_color_area_get(mac_color_area_stru * color_area)1471 static inline osal_void hal_color_area_get(mac_color_area_stru *color_area)
1472 {
1473     hal_public_hook_func(_color_area_get)(color_area);
1474 }
1475 
hal_set_dev_support_11ax(hal_to_dmac_device_stru * hal_device,osal_u8 reg_value)1476 static INLINE__ osal_void hal_set_dev_support_11ax(hal_to_dmac_device_stru *hal_device, osal_u8 reg_value)
1477 {
1478     hal_public_hook_func(_set_dev_support_11ax)(hal_device, reg_value);
1479 }
1480 
hal_set_mu_edca_lifetime(osal_u8 bk,osal_u8 be,osal_u8 vi,osal_u8 vo)1481 static INLINE__ osal_void hal_set_mu_edca_lifetime(osal_u8 bk, osal_u8 be, osal_u8 vi, osal_u8 vo)
1482 {
1483     hal_public_hook_func(_set_mu_edca_lifetime)(bk, be, vi, vo);
1484 }
1485 
hal_set_mu_edca_aifsn(osal_u8 bk,osal_u8 be,osal_u8 vi,osal_u8 vo)1486 static INLINE__ osal_void hal_set_mu_edca_aifsn(osal_u8 bk, osal_u8 be, osal_u8 vi, osal_u8 vo)
1487 {
1488     hal_public_hook_func(_set_mu_edca_aifsn)(bk, be, vi, vo);
1489 }
1490 
hal_set_mu_edca_cw(osal_u8 ac_type,osal_u8 cwmax,osal_u8 cwmin)1491 static INLINE__ osal_void hal_set_mu_edca_cw(osal_u8 ac_type, osal_u8 cwmax, osal_u8 cwmin)
1492 {
1493     hal_public_hook_func(_set_mu_edca_cw)(ac_type, cwmax, cwmin);
1494 }
1495 
hal_set_affected_acs(osal_u8 affected_acs)1496 static INLINE__ osal_void hal_set_affected_acs(osal_u8 affected_acs)
1497 {
1498     hal_public_hook_func(_set_affected_acs)(affected_acs);
1499 }
1500 
hal_set_mu_edca_func_en(osal_u8 bk,osal_u8 be,osal_u8 vi,osal_u8 vo)1501 static INLINE__ osal_void hal_set_mu_edca_func_en(osal_u8 bk, osal_u8 be, osal_u8 vi, osal_u8 vo)
1502 {
1503     hal_public_hook_func(_set_mu_edca_func_en)(bk, be, vi, vo);
1504 }
1505 
hal_close_mu_edca_func(osal_void)1506 static INLINE__ osal_void hal_close_mu_edca_func(osal_void)
1507 {
1508     hal_public_hook_func(_close_mu_edca_func)();
1509 }
1510 
hal_set_mac_backoff_delay(osal_u32 back_off_time)1511 static INLINE__ osal_void hal_set_mac_backoff_delay(osal_u32 back_off_time)
1512 {
1513     hal_public_hook_func(_set_mac_backoff_delay)(back_off_time);
1514 }
1515 
hal_set_bss_color(hal_to_dmac_vap_stru * hal_vap,osal_u8 bss_color)1516 static INLINE__ osal_void hal_set_bss_color(hal_to_dmac_vap_stru *hal_vap, osal_u8 bss_color)
1517 {
1518     hal_public_hook_func(_set_bss_color)(hal_vap, bss_color);
1519 }
1520 
hal_set_partial_bss_color(hal_to_dmac_vap_stru * hal_vap,osal_u8 partial_bss_color)1521 static INLINE__ osal_void hal_set_partial_bss_color(hal_to_dmac_vap_stru *hal_vap, osal_u8 partial_bss_color)
1522 {
1523     hal_public_hook_func(_set_partial_bss_color)(hal_vap, partial_bss_color);
1524 }
1525 
hal_set_bss_color_enable(oal_bool_enum_uint8 flag)1526 static INLINE__ osal_void hal_set_bss_color_enable(oal_bool_enum_uint8 flag)
1527 {
1528     hal_public_hook_func(_set_bss_color_enable)(flag);
1529 }
1530 
hal_set_phy_aid(osal_u16 aid)1531 static inline osal_void hal_set_phy_aid(osal_u16 aid)
1532 {
1533     hal_public_hook_func(_set_phy_aid)(aid);
1534 }
1535 
hal_set_he_rom_en(oal_bool_enum_uint8 rx_om)1536 static inline osal_void hal_set_he_rom_en(oal_bool_enum_uint8 rx_om)
1537 {
1538     hal_public_hook_func(_set_he_rom_en)(rx_om);
1539 }
1540 
hal_set_queue_size_in_ac(osal_u32 queue_size,osal_u8 vap_id,osal_u16 ac_order)1541 static inline osal_void hal_set_queue_size_in_ac(osal_u32 queue_size, osal_u8 vap_id, osal_u16 ac_order)
1542 {
1543     hal_public_hook_func(_set_queue_size_in_ac)(queue_size, vap_id, ac_order);
1544 }
1545 
1546 /*****************************************************************************
1547  功能描述  : 设置硬件接收描述符队列首地址
1548 *****************************************************************************/
hal_set_machw_rx_buff_addr(osal_u32 rx_dscr,hal_rx_dscr_queue_id_enum_uint8 queue_num)1549 static INLINE__ osal_void hal_set_machw_rx_buff_addr(osal_u32 rx_dscr, hal_rx_dscr_queue_id_enum_uint8 queue_num)
1550 {
1551     hal_public_hook_func(_set_machw_rx_buff_addr)(rx_dscr, queue_num);
1552 }
1553 
1554 /*****************************************************************************
1555  功能描述  : 挂起硬件发送
1556 *****************************************************************************/
hal_set_machw_tx_suspend(osal_void)1557 static INLINE__ osal_void  hal_set_machw_tx_suspend(osal_void)
1558 {
1559     hal_public_hook_func(_set_machw_tx_suspend)();
1560 }
1561 
1562 /*****************************************************************************
1563  功能描述  : 复位MAC 和 PHY
1564 *****************************************************************************/
hal_reset_phy_machw(hal_reset_hw_type_enum_uint8 type,osal_u8 sub_mod,osal_u8 reset_phy_reg,osal_u8 reset_mac_reg)1565 static INLINE__ osal_void  hal_reset_phy_machw(hal_reset_hw_type_enum_uint8 type, osal_u8 sub_mod,
1566     osal_u8 reset_phy_reg, osal_u8 reset_mac_reg)
1567 {
1568     hal_public_hook_func(_reset_phy_machw)(type, sub_mod, reset_phy_reg, reset_mac_reg);
1569 }
1570 osal_void hal_tpc_cali_ftm_updata_channel(hal_to_dmac_device_stru *hal_device, mac_channel_stru *channel);
1571 /*****************************************************************************
1572           RA LUT操作相关接口
1573 *****************************************************************************/
1574 /*****************************************************************************
1575  功能描述  : 设置TX SEQUENCE NUM
1576 *****************************************************************************/
hal_set_tx_sequence_num(machw_tx_sequence_stru tx_seq,osal_u32 val_write,osal_u8 vap_index)1577 static INLINE__ osal_void hal_set_tx_sequence_num(machw_tx_sequence_stru tx_seq, osal_u32 val_write, osal_u8 vap_index)
1578 {
1579     hal_public_hook_func(_set_tx_sequence_num)(tx_seq, val_write, vap_index);
1580 }
1581 
1582 /*****************************************************************************
1583  功能描述  : 控制硬件在收到单播帧时不回ACK
1584 *****************************************************************************/
hal_disable_machw_ack_trans(osal_void)1585 static INLINE__ osal_void hal_disable_machw_ack_trans(osal_void)
1586 {
1587     hal_public_hook_func(_disable_machw_ack_trans)();
1588 }
1589 
1590 /*****************************************************************************
1591  功能描述  : 控制硬件在收到单播帧时回ACK
1592 *****************************************************************************/
hal_enable_machw_ack_trans(osal_void)1593 static INLINE__ osal_void hal_enable_machw_ack_trans(osal_void)
1594 {
1595     hal_public_hook_func(_enable_machw_ack_trans)();
1596 }
1597 
1598 /*****************************************************************************
1599   RF相关接口
1600 *****************************************************************************/
1601 /*****************************************************************************
1602  函 数 名  : hal_initialize_rf_sys
1603 *****************************************************************************/
hal_initialize_rf_sys(hal_to_dmac_device_stru * hal_device)1604 static INLINE__ osal_void  hal_initialize_rf_sys(hal_to_dmac_device_stru * hal_device)
1605 {
1606     hal_public_hook_func(_initialize_rf_sys)(hal_device);
1607 }
1608 
1609 /*****************************************************************************
1610 函 数 名  : hal_adjust_tx_power
1611 功能描述  : 调整tx power
1612 *****************************************************************************/
hal_adjust_tx_power(osal_u8 ch,osal_s8 power)1613 static INLINE__ osal_void hal_adjust_tx_power(osal_u8 ch, osal_s8 power)
1614 {
1615     hal_public_hook_func(_adjust_tx_power)(ch, power);
1616 }
1617 
1618 /*****************************************************************************
1619 函 数 名  : hal_get_tpc_code
1620 功能描述  : 获取tpc_code的值
1621 *****************************************************************************/
hal_get_tpc_code(osal_void)1622 static INLINE__ osal_u8 hal_get_tpc_code(osal_void)
1623 {
1624     return hal_public_hook_func(_get_tpc_code)();
1625 }
1626 
1627 /*****************************************************************************
1628 函 数 名  : hal_restore_tx_power
1629 功能描述  : 恢复tx power
1630 *****************************************************************************/
hal_restore_tx_power(osal_u8 ch)1631 static INLINE__ osal_void hal_restore_tx_power(osal_u8 ch)
1632 {
1633     hal_public_hook_func(_restore_tx_power)(ch);
1634 }
1635 
hal_cfg_txop_cycle(osal_u16 ch)1636 static INLINE__ osal_void hal_cfg_txop_cycle(osal_u16 ch)
1637 {
1638     hal_public_hook_func(_cfg_txop_cycle)(ch);
1639 }
1640 
hal_cfg_lifetime(osal_u8 ac,osal_u16 lifetime)1641 static INLINE__ osal_void hal_cfg_lifetime(osal_u8 ac, osal_u16 lifetime)
1642 {
1643     hal_public_hook_func(_cfg_lifetime)(ac, lifetime);
1644 }
1645 
hal_bl_sifs_en(osal_u8 en)1646 static INLINE__ osal_void hal_bl_sifs_en(osal_u8 en)
1647 {
1648     hal_public_hook_func(_bl_sifs_en)(en);
1649 }
1650 
hal_rts_info(osal_u32 rate,osal_u32 phy_mode,osal_u8 * addr1)1651 static INLINE__ osal_void hal_rts_info(osal_u32 rate, osal_u32 phy_mode, osal_u8 *addr1)
1652 {
1653     hal_public_hook_func(_rts_info)(rate, phy_mode, addr1);
1654 }
1655 
hal_cfg_txop_en(osal_u8 en)1656 static INLINE__ osal_void hal_cfg_txop_en(osal_u8 en)
1657 {
1658     hal_public_hook_func(_bl_cfg_txop_en)(en);
1659 }
1660 
hal_pow_initialize_tx_power(hal_to_dmac_device_stru * hal_device)1661 static INLINE__ osal_void  hal_pow_initialize_tx_power(hal_to_dmac_device_stru * hal_device)
1662 {
1663     hal_public_hook_func(_pow_initialize_tx_power)(hal_device);
1664 }
1665 
1666 #ifdef _PRE_WLAN_FEATURE_11AX
hal_tb_mcs_tx_power(wlan_channel_band_enum_uint8 band)1667 static INLINE__ osal_void hal_tb_mcs_tx_power(wlan_channel_band_enum_uint8 band)
1668 {
1669     hal_public_hook_func(_tb_mcs_tx_power)(band);
1670 }
1671 
hal_tb_tx_power_init(wlan_channel_band_enum_uint8 band)1672 static INLINE__ osal_void hal_tb_tx_power_init(wlan_channel_band_enum_uint8 band)
1673 {
1674     hal_public_hook_func(_tb_tx_power_init)(band);
1675 }
1676 #endif /* #ifdef _PRE_WLAN_FEATURE_11AX */
1677 
hal_pow_set_rf_regctl_enable(hal_to_dmac_device_stru * hal_device,oal_bool_enum_uint8 rf_linectl)1678 static  INLINE__ osal_void hal_pow_set_rf_regctl_enable(hal_to_dmac_device_stru *hal_device,
1679     oal_bool_enum_uint8 rf_linectl)
1680 {
1681     hal_public_hook_func(_pow_set_rf_regctl_enable)(hal_device, rf_linectl);
1682 }
1683 
1684 #ifdef _PRE_WLAN_FEATURE_USER_RESP_POWER
hal_pow_del_machw_resp_power_lut_entry(osal_u8 lut_index)1685 static INLINE__ osal_void  hal_pow_del_machw_resp_power_lut_entry(osal_u8 lut_index)
1686 {
1687     hal_public_hook_func(_pow_del_machw_resp_power_lut_entry)(lut_index);
1688 }
1689 #endif
1690 
1691 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
1692 /*****************************************************************************
1693  功能描述  : hal层动态校准描述符间隔数参数配置
1694 *****************************************************************************/
hal_config_set_dyn_cali_dscr_interval(hal_to_dmac_device_stru * hal_device,wlan_channel_band_enum_uint8 band,osal_u16 param_val)1695 static INLINE__ osal_void hal_config_set_dyn_cali_dscr_interval(hal_to_dmac_device_stru *hal_device,
1696     wlan_channel_band_enum_uint8 band, osal_u16 param_val)
1697 {
1698     hal_public_hook_func(_config_set_dyn_cali_dscr_interval)(hal_device, band, param_val);
1699     return;
1700 }
1701 
1702 #endif
1703 
1704 /*****************************************************************************
1705   SoC相关接口
1706 *****************************************************************************/
1707 /*****************************************************************************
1708  函 数 名  : hal_initialize_soc
1709  功能描述  : SoC上电初始化接口
1710 *****************************************************************************/
hal_initialize_soc(hal_to_dmac_device_stru * hal_device)1711 static INLINE__ osal_void  hal_initialize_soc(hal_to_dmac_device_stru * hal_device)
1712 {
1713     hal_public_hook_func(_initialize_soc)(hal_device);
1714 }
1715 
1716 /*****************************************************************************
1717  函 数 名  : hal_clear_mac_int_status
1718 *****************************************************************************/
hal_clear_mac_int_status(osal_u32 status)1719 static INLINE__ osal_void  hal_clear_mac_int_status(osal_u32 status)
1720 {
1721     hal_public_hook_func(_clear_mac_int_status)(status);
1722 }
1723 
1724 #ifdef _PRE_WLAN_DFR_STAT
1725 /*****************************************************************************
1726  函 数 名  : hal_clear_mac_error_int_status
1727 *****************************************************************************/
hal_clear_mac_error_int_status(hal_error_state_stru * status)1728 static INLINE__ osal_void hal_clear_mac_error_int_status(hal_error_state_stru *status)
1729 {
1730     hal_public_hook_func(_clear_mac_error_int_status)(status);
1731 }
1732 #endif
1733 
hal_show_irq_info(hal_to_dmac_device_stru * hal_device,osal_u8 param)1734 static INLINE__ osal_void  hal_show_irq_info(hal_to_dmac_device_stru * hal_device, osal_u8 param)
1735 {
1736     hal_public_hook_func(_show_irq_info)(hal_device, param);
1737 }
1738 
hal_clear_irq_stat(hal_to_dmac_device_stru * hal_device)1739 static INLINE__ osal_void  hal_clear_irq_stat(hal_to_dmac_device_stru * hal_device)
1740 {
1741     hal_public_hook_func(_clear_irq_stat)(hal_device);
1742 }
1743 
hal_cali_send_func(hal_to_dmac_device_stru * hal_device,osal_u8 * cal_data_write,osal_u16 frame_len,osal_u16 remain)1744 static INLINE__ osal_void hal_cali_send_func(hal_to_dmac_device_stru *hal_device, osal_u8* cal_data_write,
1745     osal_u16 frame_len, osal_u16 remain)
1746 {
1747     hal_public_hook_func(_cali_send_func)(hal_device, cal_data_write, frame_len, remain);
1748 }
1749 
1750 
1751 /*****************************************************************************
1752  功能描述  : 配置EIFS_TIME 寄存器
1753 *****************************************************************************/
hal_config_eifs_time(wlan_protocol_enum_uint8 protocol)1754 static INLINE__ osal_void hal_config_eifs_time(wlan_protocol_enum_uint8 protocol)
1755 {
1756     hal_public_hook_func(_config_eifs_time)(protocol);
1757 }
1758 
1759 #ifdef _PRE_WLAN_ONLINE_DPD
hal_dpd_cfr_set_11b(hal_to_dmac_device_stru * hal_device,osal_u8 is_11b)1760 static INLINE__ osal_void  hal_dpd_cfr_set_11b(hal_to_dmac_device_stru *hal_device, osal_u8 is_11b)
1761 {
1762     hal_public_hook_func(_dpd_cfr_set_11b)(hal_device, is_11b);
1763 }
1764 #endif
1765 
1766 /*****************************************************************************
1767  函 数 名  : hal_get_dieid
1768  功能描述  : 获取芯片dieid
1769 *****************************************************************************/
hal_get_dieid(hal_to_dmac_device_stru * hal_device,osal_u32 * dieid,osal_u32 * length)1770 static INLINE__ osal_void hal_get_dieid(hal_to_dmac_device_stru * hal_device, osal_u32 *dieid, osal_u32 *length)
1771 {
1772     hal_public_hook_func(_get_dieid)(hal_device, dieid, length);
1773 }
1774 
1775 /*****************************************************************************
1776  功能描述  : 不过滤beacon帧
1777 *****************************************************************************/
hal_disable_beacon_filter(osal_void)1778 static  INLINE__ osal_void hal_disable_beacon_filter(osal_void)
1779 {
1780     hal_public_hook_func(_disable_beacon_filter)();
1781 }
1782 
1783 /*****************************************************************************
1784  功能描述  : 使能non frame filter
1785 *****************************************************************************/
hal_enable_non_frame_filter(osal_void)1786 static  INLINE__ osal_void hal_enable_non_frame_filter(osal_void)
1787 {
1788     hal_public_hook_func(_enable_non_frame_filter)();
1789 }
1790 
1791 #ifdef _PRE_WLAN_FEATURE_PMF
1792 /*****************************************************************************
1793  函 数 名  : hal_set_pmf_crypto
1794  功能描述  : 设置pmf加解密使能位
1795 *****************************************************************************/
hal_set_pmf_crypto(hal_to_dmac_vap_stru * hal_vap,oal_bool_enum_uint8 crypto)1796 static  INLINE__ osal_void  hal_set_pmf_crypto(hal_to_dmac_vap_stru *hal_vap, oal_bool_enum_uint8 crypto)
1797 {
1798     hal_public_hook_func(_set_pmf_crypto)(hal_vap, crypto);
1799 }
1800 #endif /* #ifdef _PRE_WLAN_FEATURE_PMF  */
1801 
1802 
1803 /*****************************************************************************
1804  功能描述  : 关闭硬件加密
1805 *****************************************************************************/
hal_disable_ce(osal_void)1806 static INLINE__ osal_void hal_disable_ce(osal_void)
1807 {
1808     hal_public_hook_func(_disable_ce)();
1809 }
1810 
1811 /*****************************************************************************
1812  功能描述  : 将指定的MAC 地址添加到硬件Lut表
1813 *****************************************************************************/
hal_ce_add_peer_macaddr(osal_u8 lut_idx,osal_u8 * addr)1814 static  INLINE__ osal_void hal_ce_add_peer_macaddr(osal_u8 lut_idx, osal_u8 * addr)
1815 {
1816     hal_public_hook_func(_ce_add_peer_macaddr)(lut_idx, addr);
1817 }
1818 
1819 /*****************************************************************************
1820  功能描述  : 将指定的MAC 地址从硬件Lut表删除
1821 *****************************************************************************/
hal_ce_del_peer_macaddr(osal_u8 lut_idx)1822 static  INLINE__ osal_void hal_ce_del_peer_macaddr(osal_u8 lut_idx)
1823 {
1824     hal_public_hook_func(_ce_del_peer_macaddr)(lut_idx);
1825 }
1826 
1827 /*****************************************************************************
1828  功能描述  : 获取硬件mac地址,来自eeprom或flash
1829 *****************************************************************************/
hal_get_hw_addr(osal_u8 * addr)1830 static INLINE__ osal_void hal_get_hw_addr(osal_u8 *addr)
1831 {
1832     hal_public_hook_func(_get_hw_addr)(addr);
1833 }
1834 
1835 
1836 /*****************************************************************************
1837  功能描述  : 设置rx过滤常收状态
1838 *****************************************************************************/
1839 osal_void hal_rx_filter_set_alrx_state(hal_device_always_rx_state_enum al_rx_flag);
1840 osal_void hal_mac_interrupt_clear(osal_void);
1841 
1842 /*****************************************************************************
1843  功能描述  : 设置rx帧过滤配置
1844             注: 入参value:
1845             bit0=1 :上报组播(广播)数据帧使能标志
1846             bit1=1 :上报单播数据包使能标志
1847             bit2=1 :上报组播(广播)管理帧使能标志
1848             bit3=1 :上报单播管理帧使能标志
1849 *****************************************************************************/
1850 osal_void hal_rx_filter_set_rx_flt_en(osal_u32 value);
1851 
1852 #ifdef _PRE_WLAN_FEATURE_TXBF
1853 /*****************************************************************************
1854  函 数 名  : hal_set_dl_mumimo_ctrl
1855  功能描述  : 设置MU-MIMO控制寄存器
1856 *****************************************************************************/
hal_set_dl_mumimo_ctrl(oal_bool_enum_uint8 enable)1857 static  INLINE__ osal_void hal_set_dl_mumimo_ctrl(oal_bool_enum_uint8 enable)
1858 {
1859     hal_public_hook_func(_set_dl_mumimo_ctrl)(enable);
1860 }
1861 
1862 /*****************************************************************************
1863  函 数 名  : hal_set_h_matrix_timeout
1864  功能描述  : 设置TXBF 矩阵超时寄存器
1865 *****************************************************************************/
hal_set_h_matrix_timeout(osal_u32 reg_value)1866 static  INLINE__ osal_void hal_set_h_matrix_timeout(osal_u32 reg_value)
1867 {
1868     hal_public_hook_func(_set_h_matrix_timeout)(reg_value);
1869 }
1870 
1871 /*****************************************************************************
1872  功能描述  : 设置mu-mimo aid以及matrix地址
1873 *****************************************************************************/
hal_set_mu_aid_matrix_info(hal_to_dmac_vap_stru * hal_vap,osal_u16 aid)1874 static  INLINE__ osal_void hal_set_mu_aid_matrix_info(hal_to_dmac_vap_stru *hal_vap, osal_u16 aid)
1875 {
1876     hal_public_hook_func(_set_mu_aid_matrix_info)(hal_vap, aid);
1877 }
1878 
1879 /*****************************************************************************
1880  功能描述  : 设置VHT matrix buff的地址
1881 *****************************************************************************/
hal_set_txbf_he_buff_addr(osal_u32 addr,osal_u16 buffer_len)1882 static  INLINE__ osal_void hal_set_txbf_he_buff_addr(osal_u32 addr, osal_u16 buffer_len)
1883 {
1884     hal_public_hook_func(_set_txbf_he_buff_addr)(addr, buffer_len);
1885 }
1886 
1887 /*****************************************************************************
1888  函 数 名  : hal_set_bfee_bypass_clk_gating
1889  功能描述  : 异系统共存时,是否开启clk gating
1890 *****************************************************************************/
hal_set_bfee_bypass_clk_gating(osal_u8 enable)1891 static  INLINE__ osal_void hal_set_bfee_bypass_clk_gating(osal_u8 enable)
1892 {
1893     hal_public_hook_func(_set_bfee_bypass_clk_gating)(enable);
1894 }
1895 
1896 /*****************************************************************************
1897  函 数 名  : hal_set_channel_est_for_txbfee
1898  功能描述  : 使能TXBF时启用MLD,否则使用Zero-Force
1899 *****************************************************************************/
hal_set_channel_est_for_txbfee(osal_u8 txbf,wlan_channel_bandwidth_enum_uint8 bandwidth,wlan_channel_band_enum_uint8 band)1900 static  INLINE__ osal_void hal_set_channel_est_for_txbfee(osal_u8 txbf,
1901     wlan_channel_bandwidth_enum_uint8 bandwidth, wlan_channel_band_enum_uint8 band)
1902 {
1903     hal_public_hook_func(_set_channel_est_for_txbfee)(txbf, bandwidth, band);
1904 }
1905 
1906 /*****************************************************************************
1907  功能描述  : 启动反馈矩阵
1908 *****************************************************************************/
hal_set_bfee_sounding_en(osal_u8 bfee_enable)1909 static  INLINE__ osal_void hal_set_bfee_sounding_en(osal_u8 bfee_enable)
1910 {
1911     hal_public_hook_func(_set_bfee_sounding_en)(bfee_enable);
1912 }
1913 
1914 /*****************************************************************************
1915  功能描述  : 设置ht sounding的压缩V矩阵的子载波分组
1916 *****************************************************************************/
hal_set_bfee_h2v_beamforming_ng(osal_u8 user_bw)1917 static  INLINE__ osal_void hal_set_bfee_h2v_beamforming_ng(osal_u8 user_bw)
1918 {
1919     hal_public_hook_func(_set_bfee_h2v_beamforming_ng)(user_bw);
1920 }
1921 
1922 /*****************************************************************************
1923  功能描述  : 设置ht sounding的压缩V矩阵的子载波分组,并且使能ht bfee
1924 *****************************************************************************/
hal_set_bfee_grouping_codebook(osal_u8 codebook,osal_u8 min_group)1925 static  INLINE__ osal_void hal_set_bfee_grouping_codebook(osal_u8 codebook, osal_u8 min_group)
1926 {
1927     hal_public_hook_func(_set_bfee_grouping_codebook)(codebook, min_group);
1928 }
1929 
1930 /*****************************************************************************
1931  功能描述  : 根据带宽设置计算bfer解压缩子载波分组
1932 *****************************************************************************/
hal_set_bfer_subcarrier_ng(wlan_bw_cap_enum_uint8 user_bw)1933 static INLINE__ osal_void hal_set_bfer_subcarrier_ng(wlan_bw_cap_enum_uint8 user_bw)
1934 {
1935     hal_public_hook_func(_set_bfer_subcarrier_ng)(user_bw);
1936 }
1937 #endif  /* _PRE_WLAN_FEATURE_TXBF */
1938 
1939 /*****************************************************************************
1940  功能描述  : 获取mac rx关键统计信息
1941 *****************************************************************************/
hal_get_mac_rx_statistics_data(hal_mac_rx_mpdu_statis_info_stru * mac_rx_statis)1942 static  INLINE__ osal_void hal_get_mac_rx_statistics_data(hal_mac_rx_mpdu_statis_info_stru *mac_rx_statis)
1943 {
1944     hal_public_hook_func(_get_mac_rx_statistics_data)(mac_rx_statis);
1945 }
1946 /*****************************************************************************
1947  功能描述  : 获取mac rx关键统计信息
1948 *****************************************************************************/
hal_get_mac_tx_statistics_data(hal_mac_tx_mpdu_statis_info_stru * mac_tx_statis)1949 static  INLINE__ osal_void hal_get_mac_tx_statistics_data(hal_mac_tx_mpdu_statis_info_stru *mac_tx_statis)
1950 {
1951     hal_public_hook_func(_get_mac_tx_statistics_data)(mac_tx_statis);
1952 }
1953 /*****************************************************************************
1954  功能描述  : 清除MAC统计信息
1955 *****************************************************************************/
hal_hw_stat_clear(osal_void)1956 static  INLINE__ osal_void hal_hw_stat_clear(osal_void)
1957 {
1958     hal_public_hook_func(_hw_stat_clear)();
1959 }
1960 
1961 /*****************************************************************************
1962  功能描述  : 检查mac中断状态
1963 *****************************************************************************/
hal_check_mac_int_status(osal_void)1964 static INLINE__ oal_bool_enum_uint8 hal_check_mac_int_status(osal_void)
1965 {
1966     return hal_public_hook_func(_check_mac_int_status)();
1967 }
1968 
1969 /*****************************************************************************
1970  功能描述  : 使能EDCA寄存器
1971 *****************************************************************************/
hal_enable_machw_edca(osal_void)1972 static INLINE__ osal_void  hal_enable_machw_edca(osal_void)
1973 {
1974     hal_public_hook_func(_enable_machw_edca)();
1975 }
1976 
1977 
1978 /*****************************************************************************
1979  函 数 名  : hal_set_phy_max_bw_field
1980  功能描述  : 设置phy max bw下三个功能配置
1981 *****************************************************************************/
hal_set_phy_max_bw_field(hal_to_dmac_device_stru * hal_device,osal_u32 data,hal_phy_max_bw_sect_enmu_uint8 sect)1982 static  INLINE__ osal_void hal_set_phy_max_bw_field(hal_to_dmac_device_stru *hal_device,
1983     osal_u32 data, hal_phy_max_bw_sect_enmu_uint8 sect)
1984 {
1985     hal_public_hook_func(_set_phy_max_bw_field)(hal_device, data, sect);
1986 }
1987 #ifdef _PRE_WLAN_FEATURE_ALWAYS_TX
1988 /*****************************************************************************
1989  函 数 名  : hal_rf_test_disable_al_tx
1990  功能描述  : 禁用常发
1991 *****************************************************************************/
hal_rf_test_disable_al_tx(hal_to_dmac_device_stru * hal_device)1992 static  INLINE__ osal_void hal_rf_test_disable_al_tx(hal_to_dmac_device_stru *hal_device)
1993 {
1994     hal_public_hook_func(_rf_test_disable_al_tx)(hal_device);
1995 }
1996 #endif
1997 #ifndef _PRE_WLAN_FEATURE_WS63
1998 /*****************************************************************************
1999  功能描述  : 配置寄存器帧过滤寄存器某些bit
2000 *****************************************************************************/
hal_set_rx_filter_reg(osal_u32 rx_filter_command)2001 static  INLINE__ osal_void hal_set_rx_filter_reg(osal_u32 rx_filter_command)
2002 {
2003     hal_public_hook_func(_set_rx_filter_reg)(rx_filter_command);
2004 }
2005 #endif
2006 
2007 /*****************************************************************************
2008  函 数 名  : hal_vap_set_beacon_rate
2009  功能描述  : 设置beacon发送速率
2010 *****************************************************************************/
hal_vap_set_beacon_rate(hal_to_dmac_vap_stru * hal_vap,osal_u32 beacon_rate)2011 static INLINE__ osal_void  hal_vap_set_beacon_rate(hal_to_dmac_vap_stru        *hal_vap,
2012     osal_u32 beacon_rate)
2013 {
2014     hal_public_hook_func(_vap_set_beacon_rate)(hal_vap, beacon_rate);
2015 }
2016 
2017 /*****************************************************************************
2018   10.2 对应一套硬件MAC VAP的静态内联函数
2019 *****************************************************************************/
hal_vap_set_macaddr(hal_to_dmac_vap_stru * hal_vap,const osal_u8 * mac_addr,osal_u16 mac_addr_len)2020 static INLINE__ osal_void hal_vap_set_macaddr(hal_to_dmac_vap_stru * hal_vap, const osal_u8 *mac_addr,
2021     osal_u16 mac_addr_len)
2022 {
2023     hal_public_hook_func(_vap_set_macaddr)(hal_vap, mac_addr, mac_addr_len);
2024 }
2025 
2026 /*****************************************************************************
2027  函 数 名  : hal_vap_set_opmode
2028 *****************************************************************************/
hal_vap_set_opmode(hal_to_dmac_vap_stru * hal_vap,wlan_vap_mode_enum_uint8 vap_mode)2029 static INLINE__ osal_void  hal_vap_set_opmode(hal_to_dmac_vap_stru *hal_vap, wlan_vap_mode_enum_uint8 vap_mode)
2030 {
2031     hal_public_hook_func(_vap_set_opmode)(hal_vap, vap_mode);
2032 }
2033 
2034 
2035 /*****************************************************************************
2036  函 数 名  : hal_vap_clr_opmode
2037 *****************************************************************************/
hal_vap_clr_opmode(hal_to_dmac_vap_stru * hal_vap,wlan_vap_mode_enum_uint8 vap_mode)2038 static INLINE__ osal_void hal_vap_clr_opmode(hal_to_dmac_vap_stru *hal_vap, wlan_vap_mode_enum_uint8 vap_mode)
2039 {
2040     hal_public_hook_func(_vap_clr_opmode)(hal_vap, vap_mode);
2041 }
2042 
2043 /*****************************************************************************
2044   hal vap EDCA参数配置相关接口
2045 *****************************************************************************/
2046 /*****************************************************************************
2047  函 数 名  : hal_vap_set_machw_aifsn_all_ac
2048  功能描述  : 设置所有AC的仲裁帧间距(arbitration inter-frame space, AIFS)
2049 *****************************************************************************/
hal_vap_set_machw_aifsn_all_ac(osal_u8 bk,osal_u8 be,osal_u8 vi,osal_u8 vo)2050 static INLINE__ osal_void  hal_vap_set_machw_aifsn_all_ac(osal_u8 bk, osal_u8 be, osal_u8 vi, osal_u8 vo)
2051 {
2052     hal_public_hook_func(_vap_set_machw_aifsn_all_ac)(bk, be, vi, vo);
2053 }
2054 
2055 /*****************************************************************************
2056  函 数 名  : hal_vap_set_machw_aifsn_ac
2057 *****************************************************************************/
hal_vap_set_machw_aifsn_ac(wlan_wme_ac_type_enum_uint8 ac,osal_u8 aifs)2058 static INLINE__ osal_void  hal_vap_set_machw_aifsn_ac(wlan_wme_ac_type_enum_uint8 ac, osal_u8 aifs)
2059 {
2060     hal_public_hook_func(_vap_set_machw_aifsn_ac)(ac, aifs);
2061 }
2062 /*****************************************************************************
2063  函 数 名  : hal_vap_set_machw_aifsn_ac
2064 *****************************************************************************/
hal_vap_get_machw_aifsn_ac(wlan_wme_ac_type_enum_uint8 ac,osal_u8 * aifs)2065 static INLINE__ osal_void  hal_vap_get_machw_aifsn_ac(wlan_wme_ac_type_enum_uint8 ac, osal_u8 *aifs)
2066 {
2067     hal_public_hook_func(_vap_get_machw_aifsn_ac)(ac, aifs);
2068 }
2069 
hal_vap_set_machw_aifsn_ac_wfa(wlan_wme_ac_type_enum_uint8 ac,osal_u8 aifs,wlan_wme_ac_type_enum_uint8 wfa_lock)2070 static INLINE__ osal_void  hal_vap_set_machw_aifsn_ac_wfa(wlan_wme_ac_type_enum_uint8 ac,
2071     osal_u8 aifs, wlan_wme_ac_type_enum_uint8 wfa_lock)
2072 {
2073     hal_public_hook_func(_vap_set_machw_aifsn_ac_wfa)(ac, aifs, wfa_lock);
2074 }
2075 
hal_vap_set_edca_machw_cw_wfa(osal_u8 cwmaxmin,osal_u8 ec_type,wlan_wme_ac_type_enum_uint8 wfa_lock)2076 static INLINE__ osal_void  hal_vap_set_edca_machw_cw_wfa(osal_u8 cwmaxmin, osal_u8 ec_type,
2077     wlan_wme_ac_type_enum_uint8 wfa_lock)
2078 {
2079     hal_public_hook_func(_vap_set_edca_machw_cw_wfa)(cwmaxmin, ec_type, wfa_lock);
2080 }
2081 
2082 /*****************************************************************************
2083  函 数 名  : hal_vap_set_edca_machw_cw
2084  功能描述  : 设置BE、BK、VI、VO竞争窗口的上下限(CWmin, CWmax)
2085 *****************************************************************************/
hal_vap_set_edca_machw_cw(osal_u8 cwmax,osal_u8 cwmin,osal_u8 ec_type)2086 static INLINE__ osal_void  hal_vap_set_edca_machw_cw(osal_u8 cwmax, osal_u8 cwmin,
2087     osal_u8 ec_type)
2088 {
2089     hal_public_hook_func(_vap_set_edca_machw_cw)(cwmax, cwmin, ec_type);
2090 }
2091 
2092 /*****************************************************************************
2093  函 数 名  : hal_vap_get_edca_machw_cw
2094  功能描述  : 获取BE、BK、VI、VO竞争窗口的上下限(CWmin, CWmax)
2095 *****************************************************************************/
hal_vap_get_edca_machw_cw(osal_u8 * cwmax,osal_u8 * cwmin,osal_u8 ec_type)2096 static INLINE__ osal_void  hal_vap_get_edca_machw_cw(osal_u8 *cwmax, osal_u8 *cwmin, osal_u8 ec_type)
2097 {
2098     hal_public_hook_func(_vap_get_edca_machw_cw)(cwmax, cwmin, ec_type);
2099 }
2100 
2101 /*****************************************************************************
2102  函 数 名  : hal_vap_set_machw_txop_limit_bkbe
2103  功能描述  : 设置BK、BE的TXOP上限(单位: 微秒)
2104  输入参数  : 无
2105  输出参数  : 无
2106  返 回 值  :
2107  调用函数  :
2108  被调函数  :
2109 
2110  修改历史      :
2111   1.日    期   : 2013年5月11日
2112     修改内容   : 新生成函数
2113 
2114 *****************************************************************************/
hal_vap_set_machw_txop_limit_bkbe(osal_u16 be,osal_u16 bk)2115 static INLINE__ osal_void  hal_vap_set_machw_txop_limit_bkbe(osal_u16 be, osal_u16 bk)
2116 {
2117     hal_public_hook_func(_vap_set_machw_txop_limit_bkbe)(be, bk);
2118 }
2119 
2120 /*****************************************************************************
2121  函 数 名  : hal_vap_get_machw_txop_limit_bkbe
2122  功能描述  : 获取BK、BE的TXOP上限(单位: 微秒)
2123 *****************************************************************************/
hal_vap_get_machw_txop_limit_bkbe(osal_u16 * be,osal_u16 * bk)2124 static INLINE__ osal_void  hal_vap_get_machw_txop_limit_bkbe(osal_u16 *be, osal_u16 *bk)
2125 {
2126     hal_public_hook_func(_vap_get_machw_txop_limit_bkbe)(be, bk);
2127 }
2128 
2129 /*****************************************************************************
2130  功能描述  : 设置txop_duration_threshold(单位: 32微秒)
2131 *****************************************************************************/
hal_vap_set_txop_duration_threshold(osal_u32 txop_duration_threshold,osal_u8 vap_id)2132 static INLINE__ osal_void hal_vap_set_txop_duration_threshold(osal_u32 txop_duration_threshold, osal_u8 vap_id)
2133 {
2134     hal_public_hook_func(_vap_set_txop_duration_threshold)(txop_duration_threshold, vap_id);
2135 }
2136 
2137 /*****************************************************************************
2138  功能描述  : 设置MAC时钟频率
2139 *****************************************************************************/
hal_set_mac_freq(hal_clk_freq_enum_uint8 mac_clk_freq)2140 static INLINE__ osal_void hal_set_mac_freq(hal_clk_freq_enum_uint8 mac_clk_freq)
2141 {
2142     hal_public_hook_func(_set_mac_freq)(mac_clk_freq);
2143 }
2144 
2145 /*****************************************************************************
2146  功能描述  : 设置AX vap idx(单位: 32微秒)
2147 *****************************************************************************/
hal_set_11ax_vap_idx(osal_u8 hal_vap_id)2148 static INLINE__ osal_void hal_set_11ax_vap_idx(osal_u8 hal_vap_id)
2149 {
2150     hal_public_hook_func(_set_11ax_vap_idx)(hal_vap_id);
2151 }
2152 
2153 /*****************************************************************************
2154  函 数 名  : hal_set_txop_check_cca
2155  功能描述  : 设置txop check cca。
2156 *****************************************************************************/
hal_set_txop_check_cca(osal_u8 txop_check_cca)2157 static INLINE__ osal_void hal_set_txop_check_cca(osal_u8 txop_check_cca)
2158 {
2159     hal_public_hook_func(_set_txop_check_cca)(txop_check_cca);
2160 }
2161 
2162 /*****************************************************************************
2163  函 数 名  : hal_vap_set_machw_txop_limit_vivo
2164  功能描述  : 设置VI、VO的TXOP上限(单位: 微秒)
2165 *****************************************************************************/
hal_vap_set_machw_txop_limit_vivo(osal_u16 vo,osal_u16 vi)2166 static INLINE__ osal_void  hal_vap_set_machw_txop_limit_vivo(osal_u16 vo, osal_u16 vi)
2167 {
2168     hal_public_hook_func(_vap_set_machw_txop_limit_vivo)(vo, vi);
2169 }
2170 
2171 /*****************************************************************************
2172  函 数 名  : hal_vap_get_machw_txop_limit_vivo
2173  功能描述  : 获取VI、VO的TXOP上限(单位: 微秒)
2174 *****************************************************************************/
hal_vap_get_machw_txop_limit_vivo(osal_u16 * vo,osal_u16 * vi)2175 static INLINE__ osal_void  hal_vap_get_machw_txop_limit_vivo(osal_u16 *vo, osal_u16 *vi)
2176 {
2177     hal_public_hook_func(_vap_get_machw_txop_limit_vivo)(vo, vi);
2178 }
2179 
2180 #ifdef _PRE_WLAN_SUPPORT_CCPRIV_CMD
2181 /*****************************************************************************
2182  函 数 名  : hal_vap_set_machw_edca_bkbe_lifetime
2183  功能描述  : 设置BK、BE的生存时限
2184 *****************************************************************************/
hal_vap_set_machw_edca_bkbe_lifetime(osal_u16 be,osal_u16 bk)2185 static INLINE__ osal_void  hal_vap_set_machw_edca_bkbe_lifetime(osal_u16 be, osal_u16 bk)
2186 {
2187     hal_public_hook_func(_vap_set_machw_edca_bkbe_lifetime)(be, bk);
2188 }
2189 
2190 /*****************************************************************************
2191  函 数 名  : hal_vap_get_machw_edca_bkbe_lifetime
2192  功能描述  : 获取BK、BE的生存时限
2193 *****************************************************************************/
hal_vap_get_machw_edca_bkbe_lifetime(osal_u16 * be,osal_u16 * bk)2194 static INLINE__ osal_void  hal_vap_get_machw_edca_bkbe_lifetime(osal_u16 *be, osal_u16 *bk)
2195 {
2196     hal_public_hook_func(_vap_get_machw_edca_bkbe_lifetime)(be, bk);
2197 }
2198 
2199 /*****************************************************************************
2200  函 数 名  : hal_vap_set_machw_edca_vivo_lifetime
2201  功能描述  : 设置VI、VO的生存时限
2202 *****************************************************************************/
hal_vap_set_machw_edca_vivo_lifetime(osal_u16 vo,osal_u16 vi)2203 static INLINE__ osal_void  hal_vap_set_machw_edca_vivo_lifetime(osal_u16 vo, osal_u16 vi)
2204 {
2205     hal_public_hook_func(_vap_set_machw_edca_vivo_lifetime)(vo, vi);
2206 }
2207 
2208 /*****************************************************************************
2209  函 数 名  : hal_vap_get_machw_edca_vivo_lifetime
2210  功能描述  : 获取VI、VO的生存时限
2211 *****************************************************************************/
hal_vap_get_machw_edca_vivo_lifetime(osal_u16 * vo,osal_u16 * vi)2212 static INLINE__ osal_void  hal_vap_get_machw_edca_vivo_lifetime(osal_u16 *vo, osal_u16 *vi)
2213 {
2214     hal_public_hook_func(_vap_get_machw_edca_vivo_lifetime)(vo, vi);
2215 }
2216 #endif
2217 
2218 /*****************************************************************************
2219  函 数 名  : hal_set_sta_bssid
2220  功能描述  : 设置BSSID
2221 *****************************************************************************/
hal_set_sta_bssid(hal_to_dmac_vap_stru * hal_vap,osal_u8 * byte,osal_u16 byte_len)2222 static  INLINE__ osal_void hal_set_sta_bssid(hal_to_dmac_vap_stru *hal_vap, osal_u8 *byte, osal_u16 byte_len)
2223 {
2224     unref_param(byte_len);
2225     hal_public_hook_func(_set_sta_bssid)(hal_vap, byte);
2226 }
2227 
hal_init_pm_info(hal_to_dmac_vap_stru * hal_vap)2228 static INLINE__ osal_void hal_init_pm_info(hal_to_dmac_vap_stru *hal_vap)
2229 {
2230     hal_public_hook_func(_init_pm_info)(hal_vap);
2231 }
2232 
hal_init_pm_info_sync(hal_to_dmac_vap_stru * hal_vap)2233 static INLINE__ osal_void hal_init_pm_info_sync(hal_to_dmac_vap_stru *hal_vap)
2234 {
2235     hal_public_hook_func(_init_pm_info_sync)(hal_vap);
2236 }
2237 
hal_pm_get_ext_inner_offset_diff(osal_void)2238 static INLINE__ osal_u16 *hal_pm_get_ext_inner_offset_diff(osal_void)
2239 {
2240     return hal_public_hook_func(_pm_get_ext_inner_offset_diff)();
2241 }
2242 
2243 /* 设置管理帧,组播 广播数据帧除基本信息外的所有其他描述符字段 */
hal_tx_non_ucast_data_set_dscr(hal_to_dmac_device_stru * hal_device,hal_tx_dscr_stru * tx_dscr,hal_tx_txop_feature_stru * txop_feature,hal_tx_txop_alg_stru * txop_alg,hal_tx_ppdu_feature_stru * ppdu_feature)2244 static INLINE__ osal_void hal_tx_non_ucast_data_set_dscr(hal_to_dmac_device_stru *hal_device,
2245     hal_tx_dscr_stru *tx_dscr, hal_tx_txop_feature_stru *txop_feature, hal_tx_txop_alg_stru *txop_alg,
2246     hal_tx_ppdu_feature_stru *ppdu_feature)
2247 {
2248     hal_public_hook_func(_tx_non_ucast_data_set_dscr)(hal_device, tx_dscr, txop_feature, txop_alg, ppdu_feature);
2249 }
2250 
2251 /*****************************************************************************
2252  函 数 名  : hal_get_rate_80211g_table
2253  功能描述  : 获取80211g速率
2254 *****************************************************************************/
hal_get_rate_80211g_table(const hal_to_dmac_device_stru * hal_device,const mac_data_rate_stru ** rate)2255 static  INLINE__ osal_void hal_get_rate_80211g_table(const hal_to_dmac_device_stru *hal_device,
2256     const mac_data_rate_stru **rate)
2257 {
2258     unref_param(hal_device);
2259     hal_public_hook_func(_get_rate_80211g_table)(rate);
2260 }
2261 
2262 /*****************************************************************************
2263  函 数 名  : hal_get_rate_80211g_num
2264  功能描述  : 获取80211g速率个数
2265 *****************************************************************************/
hal_get_rate_80211g_num(const hal_to_dmac_device_stru * hal_device,osal_u32 * data_num)2266 static INLINE__ osal_void hal_get_rate_80211g_num(const hal_to_dmac_device_stru *hal_device, osal_u32 *data_num)
2267 {
2268     unref_param(hal_device);
2269     hal_public_hook_func(_get_rate_80211g_num)(data_num);
2270 }
2271 
2272 osal_void hal_dump_phy_reg(osal_void);
2273 osal_void hal_dump_mac_reg(osal_void);
2274 osal_void hal_dump_stats(osal_void);
2275 
2276 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
2277 /************************************ *****************************************
2278  功能描述  : 动态校准统计信息
2279 *****************************************************************************/
2280 osal_u64 hal_get_dyn_cali_send_pack_num(osal_void);
2281 osal_void hal_set_dyn_cali_send_pack_num(osal_u64 value);
2282 #endif
2283 osal_void hal_pow_sync_tpc_code_to_dmac(hal_to_dmac_device_stru *hal_device, osal_u8 vap_id);
2284 osal_u32 hal_pow_read_machw_resp_power_lut_entry(osal_u8 lut_index);
2285 osal_u8 hal_save_machw_phy_pa_status(hal_to_dmac_device_stru *hal_device_base);
2286 #ifdef __cplusplus
2287 #if __cplusplus
2288 }
2289 #endif
2290 #endif
2291 
2292 #endif /* end of hal_ext_rom.h */
2293