• 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   文 件 名   : hmac_11r.h
15   作    者   :
16   生成日期   : 2023年3月2日
17   功能描述   : hmac_11r.c的头文件
18  */
19 
20 #ifndef HMAC_11R_H
21 #define HMAC_11R_H
22 
23 /*****************************************************************************
24   1 其他头文件包含
25 *****************************************************************************/
26 #include "hmac_roam_main.h"
27 #include "oal_net_cfg80211.h"
28 
29 #ifdef __cplusplus
30 #if __cplusplus
31 extern "C" {
32 #endif
33 #endif
34 
35 #undef  THIS_FILE_ID
36 #define THIS_FILE_ID OAM_FILE_ID_HMAC_11R_H
37 
38 /*****************************************************************************
39   2 宏定义
40 *****************************************************************************/
41 #define FT_NETBUF_CB_LENTH  48
42 #define WAL_WIFI_FEATURE_SUPPORT_11R 2
43 #define MAC_MAX_FTE_LEN 257
44 #define FT_CAPABILITY_OFFSET 4
45 
46 /*****************************************************************************
47   3 枚举定义
48 *****************************************************************************/
49 
50 /*****************************************************************************
51   4 全局变量声明
52 *****************************************************************************/
53 
54 /*****************************************************************************
55   5 消息头定义
56 *****************************************************************************/
57 
58 /*****************************************************************************
59   6 消息定义
60 *****************************************************************************/
61 
62 /*****************************************************************************
63   7 STRUCT定义
64 *****************************************************************************/
65 typedef struct {
66     osal_u8                    bssid[WLAN_MAC_ADDR_LEN];
67     osal_u16                   ft_ie_len;
68     osal_u8                    ft_ie_buff[0];
69 } hmac_roam_ft_stru;
70 
71 typedef struct {
72     osal_u16 mdid; /* Mobile Domain ID */
73     osal_u16 len;  /* FTE 的长度 */
74     osal_u8 ie[MAC_MAX_FTE_LEN];
75 } mac_cfg80211_ft_ies_stru;
76 
77 typedef struct {
78     oal_cfg80211_bss_stru *bss;
79     const osal_u8 *ie;
80     osal_u8 ie_len;
81     oal_nl80211_auth_type_enum_uint8 auth_type;
82     const osal_u8 *key;
83     osal_u8 key_len;
84     osal_u8 key_idx;
85 } mac_cfg80211_auth_req_stru;
86 
87 typedef struct {
88     osal_u8 enable_11r;
89     osal_u8 enable_11r_over_ds;
90     osal_u8 resv[2];
91 } hmac_11r_vap_info_stru;
92 
93 /*****************************************************************************
94   8 UNION定义
95 *****************************************************************************/
96 
97 /*****************************************************************************
98   9 OTHERS定义
99 *****************************************************************************/
100 
101 /*****************************************************************************
102   10 inline函数定义
103 *****************************************************************************/
104 
105 /*****************************************************************************
106   11 函数声明
107 *****************************************************************************/
108 static osal_u32 hmac_11r_init_weakref(osal_void) __attribute__ ((weakref("hmac_11r_init"), used));
109 static osal_void hmac_11r_deinit_weakref(osal_void) __attribute__ ((weakref("hmac_11r_deinit"), used));
110 
111 typedef osal_void (*hmac_11r_set_md_ie_cb)(hmac_vap_stru *hmac_vap, osal_u8 **buffer, osal_u8 *ie_len);
112 typedef osal_void (*hmac_11r_set_authentication_mode_cb)(hmac_vap_stru *hmac_vap,
113     const mac_conn_security_stru *conn_sec);
114 typedef osal_void (*hmac_11r_mib_init_cfg_cb)(hmac_vap_stru *hmac_vap, const mac_conn_security_stru *conn_sec,
115     mac_bss_dscr_stru *bss_dscr);
116 typedef osal_void (*hmac_11r_init_ft_cfg_cb)(hmac_vap_stru *hmac_vap, mac_conn_security_stru *conn_sec);
117 typedef osal_void (*hmac_11r_encap_auth_req_ft_ie_cb)(hmac_vap_stru *hmac_vap, osal_u8 *mgmt_frame,
118     osal_u16 *auth_req_len);
119 typedef osal_u32 (*hmac_roam_auth_seq2_11r_process_cb)(hmac_vap_stru *hmac_vap, hmac_roam_info_stru *roam_info,
120     mac_rx_ctl_stru *rx_ctrl, osal_u8 *mac_hdr);
121 typedef osal_u32 (*hmac_11r_process_assoc_rsp_cb)(hmac_vap_stru *hmac_vap, hmac_roam_info_stru *roam_info);
122 typedef osal_u32 (*hmac_11r_roam_connect_start_etc_cb)(hmac_vap_stru *hmac_vap, hmac_roam_info_stru *roam_info,
123     mac_bss_dscr_stru *bss_dscr);
124 typedef osal_void (*hmac_11r_roam_connect_to_bss_cb)(hmac_vap_stru *hmac_vap, const hmac_roam_info_stru *roam_info,
125     oal_bool_enum_uint8 *need_to_stop_user);
126 typedef osal_void (*hmac_11r_roam_change_app_ie_cb)(hmac_vap_stru *hmac_vap, app_ie_type_uint8 *app_ie_type);
127 typedef osal_void (*hmac_11r_roam_connect_fsm_init_cb)(
128     hmac_roam_fsm_func hmac_roam_connect_fsm_func[][ROAM_CONNECT_FSM_EVENT_TYPE_BUTT]);
129 typedef osal_void (*hmac_get_11r_cap_cb)(hmac_vap_stru *hmac_vap, osal_s32 *pl_value);
130 typedef osal_void (*hmac_set_11r_md_ft_over_ds_cb)(hmac_vap_stru *hmac_vap, osal_u8 *ies, osal_u32 ie_len);
131 
132 #ifdef __cplusplus
133 #if __cplusplus
134 }
135 #endif
136 #endif
137 
138 #endif /* end of hmac_11r.h */
139