• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef __HMAC_SME_STA_H__
20 #define __HMAC_SME_STA_H__
21 
22 /* ****************************************************************************
23   1 其他头文件包含
24 **************************************************************************** */
25 #include "hi_types.h"
26 #include "oal_err_wifi.h"
27 #include "hmac_vap.h"
28 
29 #ifdef __cplusplus
30 #if __cplusplus
31 extern "C" {
32 #endif
33 #endif
34 
35 /* ****************************************************************************
36   2 宏定义
37 **************************************************************************** */
38 #define MAX_AUTH_CNT 3
39 #define MAX_ASOC_CNT 5
40 #ifdef _PRE_WLAN_FEATURE_PMF
41 #define MAX_ASOC_REJECT_CNT 10
42 #endif
43 #define WLAN_11B_SUPPORT_RATE_NUM 4
44 #define WLAN_11B_SUPPORT_RATE_1M 0x82
45 #define WLAN_11B_SUPPORT_RATE_2M 0x84
46 #define WLAN_11B_SUPPORT_RATE_5M 0x8b
47 #define WLAN_11B_SUPPORT_RATE_11M 0x96
48 #define WLAN_BGSCAN_CHANNEL_INTERVAL 6
49 typedef hi_void (*hmac_sme_handle_rsp_func)(hmac_vap_stru *hmac_vap, const hi_u8 *puc_msg);
50 
51 /* ****************************************************************************
52   3 枚举定义
53 **************************************************************************** */
54 /* 上报给SME结果 类型定义 */
55 typedef enum {
56     HMAC_SME_SCAN_RSP,
57     HMAC_SME_JOIN_RSP,
58     HMAC_SME_AUTH_RSP,
59     HMAC_SME_ASOC_RSP,
60 
61     HMAC_SME_RSP_BUTT
62 } hmac_sme_rsp_enum;
63 typedef hi_u8 hmac_sme_rsp_enum_uint8;
64 
65 /* ****************************************************************************
66   4 函数声明
67 **************************************************************************** */
68 hi_void hmac_send_rsp_to_sme_sta(hmac_vap_stru *hmac_vap, hmac_sme_rsp_enum_uint8 type, const hi_u8 *puc_msg);
69 hi_void hmac_handle_scan_rsp_sta(hmac_vap_stru *hmac_vap, const hi_u8 *puc_msg);
70 hi_void hmac_handle_join_rsp_sta(hmac_vap_stru *hmac_vap, const hi_u8 *puc_msg);
71 hi_void hmac_handle_auth_rsp_sta(hmac_vap_stru *hmac_vap, const hi_u8 *puc_msg);
72 hi_void hmac_handle_asoc_rsp_sta(hmac_vap_stru *hmac_vap, const hi_u8 *puc_msg);
73 #ifdef _PRE_DEBUG_MODE
74 #ifdef _PRE_WLAN_FEATURE_HIPRIV
75 hi_u32 hmac_sta_initiate_scan(mac_vap_stru *mac_vap, hi_u16 us_len, const hi_u8 *puc_param);
76 #endif
77 #endif
78 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
79 hi_u32 hmac_start_sched_scan(mac_vap_stru *mac_vap, hi_u16 us_len, const hi_u8 *puc_param);
80 hi_u32 hmac_stop_sched_scan(mac_vap_stru *mac_vap, hi_u16 us_len, const hi_u8 *puc_param);
81 #endif
82 hi_u32 hmac_process_scan_req(mac_vap_stru *mac_vap, hi_u16 us_len, const hi_u8 *puc_param);
83 hi_u32 hmac_sta_initiate_join(mac_vap_stru *mac_vap, mac_bss_dscr_stru *bss_dscr);
84 hi_void hmac_report_assoc_state_sta(const hmac_vap_stru *hmac_vap, const hi_u8 *mac_addr, hi_u8 assoc);
85 hi_void hmac_handle_conn_fail(const mac_vap_stru *mac_vap);
86 
87 #ifdef __cplusplus
88 #if __cplusplus
89 }
90 #endif
91 #endif
92 
93 #endif /* __HMAC_SME_STA_H__ */
94