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: STA侧管理帧处理头文件. 15 */ 16 17 #ifndef __HMAC_11I_H__ 18 #define __HMAC_11I_H__ 19 /***************************************************************************** 20 1 头文件包含 21 *****************************************************************************/ 22 #include "hmac_vap.h" 23 #include "hmac_user.h" 24 #include "soc_diag_wdk.h" 25 26 #ifdef __cplusplus 27 #if __cplusplus 28 extern "C" { 29 #endif 30 #endif 31 32 #undef THIS_FILE_ID 33 #define THIS_FILE_ID OAM_FILE_ID_HMAC_11I_H 34 35 /***************************************************************************** 36 2 宏定义 37 *****************************************************************************/ 38 39 40 /***************************************************************************** 41 3 枚举定义 42 *****************************************************************************/ 43 44 45 /***************************************************************************** 46 4 全局变量声明 47 *****************************************************************************/ 48 49 50 /***************************************************************************** 51 5 消息头定义 52 *****************************************************************************/ 53 54 55 /***************************************************************************** 56 6 消息定义 57 *****************************************************************************/ 58 59 60 /***************************************************************************** 61 7 STRUCT定义 62 *****************************************************************************/ 63 typedef struct { 64 osal_u8 vap_id; 65 osal_u8 key_idx; 66 wlan_ciper_protocol_type_enum_uint8 cipher_type; 67 osal_u8 resv; 68 } hmac_add_gtk_notify_stru; 69 70 typedef hmac_add_gtk_notify_stru hmac_del_gtk_notify_stru; 71 72 /***************************************************************************** 73 8 UNION定义 74 *****************************************************************************/ 75 76 77 /***************************************************************************** 78 9 OTHERS定义 79 *****************************************************************************/ 80 81 82 /***************************************************************************** 83 10 函数声明 84 *****************************************************************************/ 85 osal_u32 hmac_check_igtk_exist(osal_u8 igtk_index); 86 osal_u32 hmac_11i_add_key_from_user(const hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user); 87 88 osal_void hmac_11i_tkip_mic_failure_handler(const hmac_vap_stru *hmac_vap, const osal_u8 *user_mac, 89 oal_nl80211_key_type key_type); 90 osal_u32 hmac_reset_gtk_token(const hmac_vap_stru *hmac_vap); 91 92 osal_u32 hmac_init_security_etc(hmac_vap_stru *hmac_vap, const osal_u8 *addr); 93 osal_void hmac_sta_protocol_down_by_chipher(hmac_vap_stru *hmac_vap, mac_bss_dscr_stru *bss_dscr); 94 osal_u32 hmac_en_mic_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, oal_netbuf_stru *pst_netbuf, 95 osal_u8 *iv_len); 96 osal_u32 hmac_de_mic_etc(hmac_user_stru *hmac_user, oal_netbuf_stru *pst_netbuf); 97 osal_u32 hmac_11i_ether_type_filter_etc(hmac_vap_stru *hmac_vap, const hmac_user_stru *hmac_user, 98 osal_u16 ether_type); 99 osal_u32 hmac_config_11i_add_key_set_reg(hmac_vap_stru *hmac_vap, osal_u8 pairwise, 100 osal_u8 key_index, hmac_user_stru *hmac_user); 101 102 #ifdef __cplusplus 103 #if __cplusplus 104 } 105 #endif 106 #endif 107 108 #endif 109