• 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_MGMT_AP_H__
20 #define __HMAC_MGMT_AP_H__
21 
22 /* ****************************************************************************
23   1 其他头文件包含
24 **************************************************************************** */
25 #include "oal_ext_if.h"
26 #include "mac_frame.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 is_wep_cipher(uc_cipher) \
39     ((WLAN_80211_CIPHER_SUITE_WEP_40 == (uc_cipher)) || (WLAN_80211_CIPHER_SUITE_WEP_104 == (uc_cipher)))
40 
41 typedef struct hmac_sup_rates_info_stru {
42     hi_u32 msg_len;
43 
44     hi_u16 us_offset;
45     hi_u16 us_rsvd;
46 
47     hi_u16 *pus_msg_idx;
48 } hmac_sup_rates_info_stru;
49 
50 typedef struct hmac_update_sta_user_info_stru {
51     hi_u8 *puc_mac_hdr;
52     hi_u8 *puc_payload;
53     hi_u32 msg_len;
54 } hmac_update_sta_user_info_stru;
55 
56 typedef struct hmac_sta_check_info {
57     hi_u16 cap;
58     hi_u16 msg_idx;
59     hi_u16 offset;
60     hi_u8 rsvd[2]; /* 2 byte保留字段 */
61 } hmac_sta_check_info;
62 
63 typedef struct hmac_ap_asoc_info_stru {
64     hi_u8 *sta_mac_addr;
65     hmac_user_stru *hmac_user;
66     mac_status_code_enum_uint16 *status_code;
67 } hmac_ap_asoc_info_stru;
68 
69 typedef struct hmac_ap_asoc_req_stru {
70     const hmac_vap_stru *hmac_vap;
71     hi_u8 mgmt_frm_type;
72     hi_u8 *puc_mac_hdr;
73     hi_u8 *puc_payload;
74     hi_u32 payload_len;
75 } hmac_ap_asoc_req_stru;
76 
77 /* ****************************************************************************
78   3 函数声明
79 **************************************************************************** */
80 hi_u32 hmac_ap_up_rx_mgmt(hmac_vap_stru *hmac_vap, const dmac_wlan_crx_event_stru *mgmt_rx_event);
81 hi_u32 hmac_ap_wait_start_rx_mgmt(hmac_vap_stru *hmac_vap, hi_void *param);
82 hi_u32 hmac_mgmt_timeout_ap(hi_void *param);
83 hi_void hmac_handle_disconnect_rsp_ap(const hmac_vap_stru *hmac_vap, const hmac_user_stru *hmac_user);
84 #ifdef _PRE_WLAN_FEATURE_MESH
85 hi_u32 hmac_mesh_update_sta_sup_rates(hi_u8 *puc_sup_rates, hi_u8 sup_rates_len, hmac_user_stru *hmac_user,
86     mac_status_code_enum_uint16 *pen_status_code);
87 hi_u8 hmac_mesh_check_pcip_policy(hi_u8 policy);
88 hi_u8 hmac_mesh_check_auth_policy(hi_u8 policy);
89 #endif
90 #ifdef __cplusplus
91 #if __cplusplus
92 }
93 #endif
94 #endif
95 
96 #endif /* __HMAC_MGMT_AP_H__ */
97