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 #ifndef __WAL_EVENT_H__ 19 #define __WAL_EVENT_H__ 20 21 /* **************************************************************************** 22 1 其他头文件包含 23 **************************************************************************** */ 24 #include "oal_ext_if.h" 25 #include "wal_main.h" 26 #include "hmac_ext_if.h" 27 #include "hi_wifi_api.h" 28 #ifdef _PRE_WLAN_FEATURE_CSI 29 #include "hi_wifi_csi_api.h" 30 #endif 31 #ifdef _PRE_WLAN_FEATURE_ANY 32 #include "hi_any_api.h" 33 #endif 34 35 #ifdef __cplusplus 36 #if __cplusplus 37 extern "C" { 38 #endif 39 #endif 40 41 /* **************************************************************************** 42 2 宏定义 43 **************************************************************************** */ 44 /* **************************************************************************** 45 3 枚举定义 46 **************************************************************************** */ 47 /* **************************************************************************** 48 4 全局变量声明 49 **************************************************************************** */ 50 /* **************************************************************************** 51 5 消息头定义 52 **************************************************************************** */ 53 /* **************************************************************************** 54 6 消息定义 55 **************************************************************************** */ 56 /* **************************************************************************** 57 7 STRUCT定义 58 **************************************************************************** */ 59 /* 驱动sta上报内核的扫描结果 */ 60 typedef struct { 61 hi_s32 l_signal; /* 信号强度 */ 62 63 hi_s16 s_freq; /* bss所在信道的中心频率 */ 64 hi_u8 auc_arry[2]; /* 2 数组元素个数 */ 65 66 hi_u32 mgmt_len; /* 管理帧长度 */ 67 oal_ieee80211_mgmt_stru *mgmt; /* 管理帧起始地址 */ 68 } wal_scanned_bss_info_stru; 69 70 71 /* 驱动sta上报内核的去关联结果 */ 72 typedef struct { 73 hi_u16 us_reason_code; /* 去关联 reason code */ 74 hi_u8 auc_resv[2]; /* 2 保留字节 */ 75 76 hi_u8 *pus_disconn_ie; /* 去关联关联帧 ie */ 77 hi_u32 us_disconn_ie_len; /* 去关联关联帧 ie 长度 */ 78 } oal_disconnect_result_stru; 79 80 #ifdef _PRE_WLAN_FEATURE_MESH 81 /* 驱动MESH上报WPA去关联 */ 82 typedef struct { 83 hi_u16 us_reason_code; /* 去关联 reason code */ 84 hi_u8 auc_resv[2]; /* 2 保留字节 */ 85 86 hi_u8 *pus_disconn_ie; /* 去关联关联帧 ie */ 87 hi_u32 us_disconn_ie_len; /* 去关联关联帧 ie 长度 */ 88 } oal_mesh_close_peer_stru; 89 #endif 90 /* **************************************************************************** 91 8 UNION定义 92 **************************************************************************** */ 93 /* **************************************************************************** 94 9 OTHERS定义 95 **************************************************************************** */ 96 /* **************************************************************************** 97 10 函数声明 98 **************************************************************************** */ 99 hi_u32 wal_scan_comp_proc_sta(frw_event_mem_stru *event_mem); 100 hi_u32 wal_asoc_comp_proc_sta(frw_event_mem_stru *event_mem); 101 hi_u32 wal_disasoc_comp_proc_sta(frw_event_mem_stru *event_mem); 102 hi_u32 wal_connect_new_sta_proc_ap(frw_event_mem_stru *event_mem); 103 hi_u32 wal_disconnect_sta_proc_ap(frw_event_mem_stru *event_mem); 104 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION) 105 hi_u32 wal_mic_failure_proc(frw_event_mem_stru *event_mem); 106 #endif 107 hi_u32 wal_send_mgmt_to_host(frw_event_mem_stru *event_mem); 108 #ifdef _PRE_WLAN_FEATURE_P2P 109 hi_u32 wal_p2p_listen_timeout(frw_event_mem_stru *event_mem); 110 #endif 111 #ifdef _PRE_WLAN_FEATURE_ANY 112 hi_u32 wal_any_process_rx_data(frw_event_mem_stru *event_mem); 113 hi_u32 wal_any_process_tx_complete(frw_event_mem_stru *event_mem); 114 hi_u32 wal_any_process_scan_result(frw_event_mem_stru *event_mem); 115 hi_u32 wal_any_process_peer_info(frw_event_mem_stru *event_mem); 116 hi_u32 wal_any_wait_query_result(hmac_vap_stru *hmac_vap, hi_wifi_any_peer_info *peer); 117 hi_s32 wal_any_global_config(wlan_cfgid_enum_uint16 wid, oal_net_device_stru *netdev); 118 hi_void wal_any_set_callback(hi_wifi_any_send_complete_cb send_cb, hi_wifi_any_recv_cb recv_cb); 119 hi_void wal_any_set_scan_callback(hi_wifi_any_scan_result_cb cb); 120 #endif 121 hi_void wal_set_tpc_mode(oal_net_device_stru *netdev, hi_u32 mode); 122 #ifdef _PRE_WLAN_FEATURE_MESH 123 hi_u32 wal_mesh_close_peer_inform(frw_event_mem_stru *event_mem); 124 hi_u32 wal_mesh_new_peer_candidate(frw_event_mem_stru *event_mem); 125 #endif 126 127 #ifdef _PRE_WLAN_FEATURE_CSI 128 hi_void wal_csi_register_data_report_cb(hi_wifi_csi_data_cb func); 129 hi_u32 wal_csi_data_report(frw_event_mem_stru *event_mem); 130 hi_s32 wal_csi_switch(hi_u8 switch_flag); 131 hi_s32 wal_csi_set_config(const hi_char *ifname, hi_u32 report_min_interval, const hi_wifi_csi_entry *entry_list, 132 hi_s32 entry_num); 133 #endif 134 #ifdef _PRE_WLAN_FEATURE_P2P 135 hi_u32 wal_p2p_action_tx_status(frw_event_mem_stru *event_mem); 136 #endif 137 hi_u32 wal_get_efuse_mac_from_dev(frw_event_mem_stru *event_mem); 138 #ifdef FEATURE_DAQ 139 hi_u32 wal_data_acq_status(frw_event_mem_stru *event_mem); 140 hi_u32 wal_data_acq_result(frw_event_mem_stru *event_mem); 141 #endif 142 #if (_PRE_MULTI_CORE_MODE != _PRE_MULTI_CORE_MODE_OFFLOAD_DMAC) 143 hi_u32 wal_channel_switch_report(frw_event_mem_stru *event_mem); 144 #endif 145 #ifdef _PRE_WLAN_FEATURE_MFG_TEST 146 hi_u32 wal_get_dbg_cal_data_from_dev(frw_event_mem_stru *event_mem); 147 #endif 148 149 hi_u32 wal_report_tx_params(frw_event_mem_stru *event_mem); 150 hi_void wal_register_tx_params_callback(hi_wifi_report_tx_params_callback func); 151 152 #ifdef __cplusplus 153 #if __cplusplus 154 } 155 #endif 156 #endif 157 158 #endif /* end of wal_event.h */ 159