• 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_roam_connect.h
15  * 生成日期   : 2015年3月18日
16  * 功能描述   : hmac_roam_connect.c 的头文件
17  */
18 
19 
20 #ifndef __HMAC_ROAM_CONNECT_H__
21 #define __HMAC_ROAM_CONNECT_H__
22 
23 #include "hmac_vap.h"
24 
25 #ifdef __cplusplus
26 #if __cplusplus
27 extern "C" {
28 #endif
29 #endif
30 
31 /*****************************************************************************
32   1 其他头文件包含
33 *****************************************************************************/
34 
35 #undef  THIS_FILE_ID
36 #define THIS_FILE_ID OAM_FILE_ID_HMAC_ROAM_CONNECT_H
37 /*****************************************************************************
38   2 宏定义
39 *****************************************************************************/
40 #define ROAM_JOIN_TIME_MAX        (1 * 1000)       /* JOIN超时时间 单位ms */
41 #define ROAM_AUTH_TIME_MAX        (300)            /* AUTH超时时间 单位ms */
42 #define ROAM_ASSOC_TIME_MAX       (300)            /* ASSOC超时时间 单位ms */
43 #define ROAM_HANDSHAKE_TIME_MAX   (7 * 1000)       /* 握手超时时间 单位ms */
44 
45 /*****************************************************************************
46   3 枚举定义
47 *****************************************************************************/
48 /* 漫游connect状态机状态 */
49 typedef enum {
50     ROAM_CONNECT_STATE_INIT               = 0,
51     ROAM_CONNECT_STATE_FAIL               = ROAM_CONNECT_STATE_INIT,
52     ROAM_CONNECT_STATE_WAIT_JOIN          = 1,
53     ROAM_CONNECT_STATE_WAIT_FT_COMP       = 2,
54     ROAM_CONNECT_STATE_WAIT_AUTH_COMP     = 3,
55     ROAM_CONNECT_STATE_WAIT_ASSOC_COMP    = 4,
56     ROAM_CONNECT_STATE_HANDSHAKING        = 5,
57     ROAM_CONNECT_STATE_UP                 = 6,
58 
59     ROAM_CONNECT_STATE_BUTT
60 } roam_connect_state_enum;
61 typedef osal_u8  roam_connect_state_enum_uint8;
62 
63 /* 漫游connect状态机事件类型 */
64 typedef enum {
65     ROAM_CONNECT_FSM_EVENT_START          = 0,
66     ROAM_CONNECT_FSM_EVENT_MGMT_RX        = 1,
67     ROAM_CONNECT_FSM_EVENT_KEY_DONE       = 2,
68     ROAM_CONNECT_FSM_EVENT_TIMEOUT        = 3,
69     ROAM_CONNECT_FSM_EVENT_FT_OVER_DS     = 4,
70     ROAM_CONNECT_FSM_EVENT_TYPE_BUTT
71 } roam_connect_fsm_event_type_enum;
72 
73 /*****************************************************************************
74   4 全局变量声明
75 *****************************************************************************/
76 
77 
78 /*****************************************************************************
79   5 消息头定义
80 *****************************************************************************/
81 
82 
83 /*****************************************************************************
84   6 消息定义
85 *****************************************************************************/
86 
87 
88 /*****************************************************************************
89   7 STRUCT定义
90 *****************************************************************************/
91 
92 
93 /*****************************************************************************
94   8 UNION定义
95 *****************************************************************************/
96 
97 
98 /*****************************************************************************
99   9 OTHERS定义
100 *****************************************************************************/
101 
102 
103 /*****************************************************************************
104   10 函数声明
105 *****************************************************************************/
106 osal_u32 hmac_roam_connect_set_join_reg_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user);
107 osal_u32 hmac_roam_connect_start_etc(hmac_vap_stru *hmac_vap, mac_bss_dscr_stru *bss_dscr);
108 osal_u32 hmac_roam_connect_stop_etc(hmac_vap_stru *hmac_vap);
109 osal_u32 hmac_roam_connect_rx_mgmt_etc(oal_netbuf_stru *netbuf, hmac_vap_stru *hmac_vap);
110 osal_void hmac_roam_connect_fsm_init_etc(osal_void);
111 osal_void hmac_roam_connect_key_done_etc(hmac_vap_stru *hmac_vap);
112 osal_void hmac_roam_connect_complete_etc(hmac_vap_stru *hmac_vap, osal_u32 result);
113 osal_void hmac_roam_connect_fsm_deinit_etc(osal_void);
114 
115 #ifdef __cplusplus
116 #if __cplusplus
117 }
118 #endif
119 #endif
120 
121 #endif /* end of hmac_roam_connect.h */
122