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 __HCC_HMAC_H__ 20 #define __HCC_HMAC_H__ 21 22 /* **************************************************************************** 23 1 其他头文件包含 24 **************************************************************************** */ 25 #include "hi_types.h" 26 #include "oal_err_wifi.h" 27 #include "frw_event.h" 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif 33 #endif 34 35 /* **************************************************************************** 36 2 宏定义 37 **************************************************************************** */ 38 /* **************************************************************************** 39 3 枚举定义 40 **************************************************************************** */ 41 /* **************************************************************************** 42 4 全局变量声明 43 **************************************************************************** */ 44 /* **************************************************************************** 45 5 消息头定义 46 **************************************************************************** */ 47 typedef hi_u32 (*hcc_hmac_rx_control_event)(frw_event_mem_stru *event_mem); 48 typedef hi_u32 (*hcc_hmac_rx_data_event)(frw_event_mem_stru *event_mem, oal_netbuf_stru *netbuf, hi_u16 netbuf_num); 49 50 typedef struct { 51 hcc_hmac_rx_control_event control; 52 hcc_hmac_rx_data_event data; 53 } hcc_hmac_rx_event_handle; 54 55 /* **************************************************************************** 56 6 消息定义 57 **************************************************************************** */ 58 /* **************************************************************************** 59 7 STRUCT定义 60 **************************************************************************** */ 61 /* **************************************************************************** 62 8 UNION定义 63 **************************************************************************** */ 64 /* **************************************************************************** 65 9 OTHERS定义 66 **************************************************************************** */ 67 /* **************************************************************************** 68 10 函数声明 69 **************************************************************************** */ 70 /* 模块外部调用 */ 71 hi_u32 hcc_hmac_init(struct BusDev *bus); 72 hi_void hcc_hmac_exit(hi_void); 73 hi_u32 hcc_hmac_tx_control_event(frw_event_mem_stru *event_mem, hi_u16 payload_len); 74 hi_u32 hcc_hmac_tx_data_event(frw_event_mem_stru *event_mem, oal_netbuf_stru *netbuf, hi_bool mgmt); 75 76 /* 模块内部调用 */ 77 hi_u32 hcc_to_hmac_control_event_dispatch(frw_event_mem_stru *event_mem); 78 79 #ifdef __cplusplus 80 #if __cplusplus 81 } 82 #endif 83 #endif 84 85 #endif /* end of hmac_main */ 86