• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: HMAC to ALG的API接口文件。
15  * Create: 2020-7-3
16  */
17 
18 #ifndef __HMAC_ALG_IF_H__
19 #define __HMAC_ALG_IF_H__
20 
21 /*****************************************************************************
22   1 其他头文件包含
23 *****************************************************************************/
24 #include "hmac_alg_if_struct_define.h"
25 #ifdef __cplusplus
26 #if __cplusplus
27 extern "C" {
28 #endif
29 #endif
30 /*****************************************************************************
31   10 函数声明
32 *****************************************************************************/
33 /***************** 子算法注册注销接口 ***************/
34 osal_u32  hmac_alg_register(hmac_alg_id_enum_uint32 alg_id);
35 osal_u32  hmac_alg_unregister(hmac_alg_id_enum_uint32 alg_id);
36 oal_bool_enum_uint8 hmac_alg_is_registered(hmac_alg_id_enum_uint32 alg_id);
37 hmac_alg_stru* hmac_alg_get_callback_stru(void);
38 /***************** 回调函数注册接口 ********************/
39 osal_u32  hmac_alg_register_tx_notify_func(hmac_alg_tx_notify_enum_uint8    notify_sub_type,
40     p_alg_tx_notify_func             func);
41 osal_u32  hmac_alg_register_rx_notify_func(hmac_alg_rx_notify_enum_uint8    notify_sub_type,
42     p_alg_rx_notify_func             func);
43 osal_u32  hmac_alg_register_cfg_channel_notify_func(hmac_alg_cfg_channel_notify_enum_uint8  notify_sub_type,
44     p_alg_cfg_channel_notify_func      func);
45 osal_u32  hmac_alg_register_add_user_notify_func(hmac_alg_add_user_notify_enum_uint8 notify_sub_type,
46     p_alg_add_assoc_user_notify_func     func);
47 osal_u32  hmac_alg_register_del_user_notify_func(hmac_alg_del_user_notify_enum_uint8 notify_sub_type,
48     p_alg_delete_assoc_user_notify_func     func);
49 osal_u32  hmac_alg_register_tx_schedule_func(p_alg_tx_schedule_func  func);
50 osal_u32  hmac_alg_register_tx_schedule_timer_func(p_alg_tx_schedule_timer_func func);
51 osal_u32  hmac_alg_register_tid_update_notify_func(p_alg_update_tid_notify_func func);
52 osal_u32  hmac_alg_register_user_info_update_notify_func(p_alg_update_user_info_notify_func func);
53 osal_u32  hmac_alg_register_rx_mgmt_notify_func(hmac_alg_rx_mgmt_notify_enum_uint8 notify_sub_type,
54     p_alg_rx_mgmt_notify_func func);
55 osal_void hmac_alg_register_tbtt_notify_func(p_alg_anti_intf_tbtt_notify_func func);
56 osal_u32 hmac_alg_register_para_cfg_notify_func(alg_param_cfg_notify_enum_uint8 notify_sub_type,
57     p_alg_para_cfg_notify_func func);
58 osal_u32  hmac_alg_register_scan_param_notify(p_alg_scan_param_func func);
59 osal_u32  hmac_alg_register_scan_ch_complete_notify(p_alg_intf_det_scan_chn_cb_func func);
60 osal_u32  hmac_alg_register_vap_up_notify_func(hmac_alg_vap_up_notify_enum_uint8 notify_sub_type,
61     p_alg_vap_up_notify_func func);
62 osal_u32  hmac_alg_register_vap_down_notify_func(hmac_alg_vap_down_notify_enum_uint8 notify_sub_type,
63     p_alg_vap_down_notify_func func);
64 osal_u32  hmac_alg_register_pow_table_refresh_notify_func(p_alg_pow_table_refresh_notify_func func);
65 osal_u32  hmac_alg_register_update_rssi_level_notify_func(p_alg_update_cb_rssi_level_notify_func func);
66 osal_u32  hmac_alg_register_para_sync_notify_func(alg_param_sync_notify_enum notify_sub_type,
67     p_alg_para_sync_notify_func func);
68 osal_u32  hmac_alg_register_txbf_pow_update_notify_func(p_alg_bfee_report_pow_adjust_notify func);
69 osal_u32  hmac_alg_register_distance_notify_func(alg_distance_notify_enum_uint8 notify_sub_type,
70     p_alg_distance_notify_func func);
71 
72 /***************** 回调函数注销接口 ********************/
73 osal_void hmac_alg_unregister_tbtt_notify_func(void);
74 osal_u32  hmac_alg_unregister_tx_notify_func(hmac_alg_tx_notify_enum_uint8    notify_sub_type);
75 osal_u32  hmac_alg_unregister_rx_notify_func(hmac_alg_rx_notify_enum_uint8    notify_sub_type);
76 osal_u32  hmac_alg_unregister_cfg_channel_notify_func(hmac_alg_cfg_channel_notify_enum_uint8 notify_sub_type);
77 osal_u32  hmac_alg_unregister_add_user_notify_func(hmac_alg_add_user_notify_enum_uint8 notify_sub_type);
78 osal_u32  hmac_alg_unregister_del_user_notify_func(hmac_alg_del_user_notify_enum_uint8 notify_sub_type);
79 osal_u32  hmac_alg_unregister_tx_schedule_func(void);
80 osal_u32  hmac_alg_unregister_tx_schedule_timer_func(void);
81 osal_u32  hmac_alg_unregister_tid_update_notify_func(void);
82 osal_u32  hmac_alg_unregister_user_info_update_notify_func(void);
83 osal_u32  hmac_alg_unregister_para_cfg_notify_func(alg_param_cfg_notify_enum_uint8 notify_sub_type);
84 osal_u32  hmac_alg_unregister_rx_mgmt_notify_func(hmac_alg_rx_mgmt_notify_enum_uint8 notify_sub_type);
85 osal_u32  hmac_alg_unregister_scan_param_notify(void);
86 osal_u32  hmac_alg_unregister_scan_ch_complete_notify(void);
87 osal_u32  hmac_alg_unregister_vap_up_notify_func(hmac_alg_vap_up_notify_enum_uint8 notify_sub_type);
88 osal_u32  hmac_alg_unregister_vap_down_notify_func(hmac_alg_vap_down_notify_enum_uint8 notify_sub_type);
89 osal_u32  hmac_alg_unregister_pow_table_refresh_notify_func(osal_void);
90 osal_u32  hmac_alg_unregister_update_rssi_level_notify_func(osal_void);
91 osal_u32  hmac_alg_unregister_para_sync_notify_func(alg_param_sync_notify_enum notify_sub_type);
92 osal_u32  hmac_alg_unregister_txbf_pow_update_notify_func(osal_void);
93 osal_u32  hmac_alg_unregister_distance_notify_func(alg_distance_notify_enum_uint8 notify_sub_type);
94 
95 #ifdef _PRE_RADAR_CCA_SW_OPT
96 osal_void hmac_alg_cca_opt_radar_notify(osal_bool radar_switch);
97 osal_void hmac_alg_register_cca_opt_radar_notify_func(p_alg_cca_opt_radar_notify_func func);
98 osal_void hmac_alg_unregister_cca_opt_radar_notify_func(osal_void);
99 #endif
100 
101 #ifdef _PRE_WLAN_FEATURE_ANTI_INTERF
102 osal_u32 hmac_alg_register_anti_intf_switch_notify(p_alg_anti_intf_switch_func func);
103 osal_u32 hmac_alg_unregister_anti_intf_switch_notify(void);
104 osal_u32 hmac_alg_register_anti_intf_tx_time_notify(p_alg_anti_intf_tx_time_notify_func func);
105 osal_u32 hmac_alg_unregister_anti_intf_tx_time_notify(osal_void);
106 osal_u32 hmac_alg_anti_intf_get_tx_time(hal_to_dmac_device_stru *hal_device);
107 #endif
108 
109 /***************** 注册数据结构接口 *********************/
110 osal_u32  hmac_alg_register_device_priv_stru(const hal_to_dmac_device_stru *hal_dev,
111     hal_alg_device_stru_id_enum_uint8 dev_stru_type, osal_void *dev_stru);
112 osal_u32  hmac_alg_register_user_priv_stru(const hmac_user_stru *hmac_user,
113     hmac_alg_user_stru_id_enum_uint8 user_stru_type, osal_void *user_stru);
114 osal_u32  hmac_alg_register_tid_priv_stru(hmac_user_stru *hmac_user,
115     osal_u8 tid_no, hmac_alg_tid_stru_id_enum_uint8 tid_stru_type, osal_void *tid_stru);
116 /***************** 注销数据结构接口 *******************/
117 osal_u32  hmac_alg_unregister_device_priv_stru(const hal_to_dmac_device_stru *hal_dev,
118     hal_alg_device_stru_id_enum_uint8 dev_stru_type);
119 osal_u32  hmac_alg_unregister_user_priv_stru(const hmac_user_stru *hmac_user,
120     hmac_alg_user_stru_id_enum_uint8  user_stru_type);
121 osal_u32  hmac_alg_unregister_tid_priv_stru(const hmac_user_stru *hmac_user,
122     osal_u8 tid_no, hmac_alg_tid_stru_id_enum_uint8 tid_stru_type);
123 
124 /***************** 获取数据结构接口 *******************/
125 osal_u32  hmac_alg_get_device_priv_stru(const hal_to_dmac_device_stru  *hal_dev,
126     hal_alg_device_stru_id_enum_uint8 dev_stru_type, osal_void **pp_dev_stru);
127 osal_u32  hmac_alg_get_user_priv_stru(const hmac_user_stru * const hmac_user,
128     hmac_alg_user_stru_id_enum_uint8 user_stru_type, osal_void **pp_user_stru);
129 osal_u32  hmac_alg_get_tid_priv_stru(const hmac_user_stru * const hmac_user,
130     osal_u8 tid_no, hmac_alg_tid_stru_id_enum_uint8 tid_stru_type, osal_void **pp_tid_stru);
131 #ifdef __cplusplus
132 #if __cplusplus
133 }
134 #endif
135 #endif
136 #endif /* end of hmac_alg_if.h */
137