• 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 for hmac_main.c.
15  * Create: 2021-12-15
16  */
17 
18 #ifndef __HMAC_MAIN_H__
19 #define __HMAC_MAIN_H__
20 
21 
22 /*****************************************************************************
23   1 其他头文件包含
24 *****************************************************************************/
25 #include "dmac_ext_if_hcm.h"
26 #include "frw_hmac.h"
27 
28 #ifdef __cplusplus
29 #if __cplusplus
30 extern "C" {
31 #endif
32 #endif
33 
34 
35 #undef  THIS_FILE_ID
36 #define THIS_FILE_ID OAM_FILE_ID_HMAC_MAIN_H
37 
38 /*****************************************************************************
39   2 宏定义
40 *****************************************************************************/
41 
42 /*****************************************************************************
43   3 枚举定义
44 *****************************************************************************/
45 
46 /*****************************************************************************
47   4 全局变量声明
48 *****************************************************************************/
49 
50 /*****************************************************************************
51   5 消息头定义
52 *****************************************************************************/
53 
54 
55 /*****************************************************************************
56   6 消息定义
57 *****************************************************************************/
58 
59 
60 /*****************************************************************************
61   7 STRUCT定义
62 *****************************************************************************/
63 typedef struct {
64     osal_u32  time_stamp;
65 } hmac_timeout_event_stru;
66 
67 typedef struct {
68     osal_u32  cfg_id;
69     osal_u32  ac;
70     osal_u32  value;
71 } hmac_config_wmm_para_stru;
72 
73 #if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) \
74     && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
75 typedef struct {
76     struct semaphore            rxdata_sema;
77     osal_task                   *rxdata_thread;
78     osal_spinlock               lock;
79     osal_wait rxdata_wq;
80     oal_netbuf_head_stru        rxdata_netbuf_head;
81     osal_u32                    pkt_loss_cnt;
82     oal_bool_enum_uint8         rxthread_enable;
83 } hmac_rxdata_thread_stru;
84 #endif
85 
86 typedef osal_void (*hmac_set_dscr_func)(osal_s32, osal_u8, hmac_vap_stru*);
87 
88 /*****************************************************************************
89   8 UNION定义
90 *****************************************************************************/
91 
92 
93 /*****************************************************************************
94   9 OTHERS定义
95 *****************************************************************************/
96 
97 
98 /*****************************************************************************
99   10 函数声明
100 *****************************************************************************/
101 extern osal_u32  hmac_event_fsm_register_etc(osal_void);
102 extern osal_void  hmac_main_exit_etc(osal_void);
103 extern osal_s32  hmac_main_init_etc(osal_void);
104 #ifdef _PRE_WLAN_ONLINE_DPD
105 osal_s32 hmac_sdt_up_dpd_data(oal_netbuf_stru *netbuf);
106 #endif
107 
108 extern osal_void  hmac_rxdata_netbuf_enqueue_etc(oal_netbuf_stru  *pst_netbuf);
109 extern osal_void  hmac_rxdata_sched_etc(osal_void);
110 extern oal_bool_enum_uint8 hmac_get_rxthread_enable_etc(osal_void);
111 
112 osal_s32 hmac_syn_info_event(hmac_vap_stru *hmac_vap, frw_msg *msg);
113 osal_u32  hmac_proc_query_response_event(hmac_vap_stru *hmac_vap, osal_u8 len, osal_u8 *param);
114 osal_s32 hmac_del_ba_event(hmac_vap_stru *vap, frw_msg *msg);
115 
116 osal_void hmac_event_fsm_register(osal_void);
117 osal_void hmac_event_fsm_unregister(osal_void);
118 
119 osal_void hmac_wake_lock(osal_void);
120 osal_void hmac_wake_unlock(osal_void);
121 osal_s32 hmac_main_init_later(osal_void);
122 osal_void alg_hmac_sync_param(osal_void);
123 #ifdef __cplusplus
124 #if __cplusplus
125 }
126 #endif
127 #endif
128 
129 #endif /* end of hmac_main */
130