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_BSS_COMM_H__ 20 #define __HMAC_MGMT_BSS_COMM_H__ 21 22 /* **************************************************************************** 23 1 其他头文件包含 24 **************************************************************************** */ 25 #include "mac_frame.h" 26 #include "dmac_ext_if.h" 27 #include "hmac_vap.h" 28 #include "hmac_device.h" 29 30 #ifdef __cplusplus 31 #if __cplusplus 32 extern "C" { 33 #endif 34 #endif 35 36 #define OAL_IE_HDR_LEN 2 37 38 typedef struct { 39 hi_u8 tidno; 40 hi_u8 resvd[3]; /* 3 BYTE保留字段 */ 41 hi_u16 *frame_len; 42 } hmac_addba_req_info; 43 44 /* **************************************************************************** 45 5 函数声明 46 **************************************************************************** */ 47 hi_u16 hmac_mgmt_encap_addba_req(hmac_vap_stru *hmac_vap, hi_u8 *puc_data, dmac_ba_tx_stru *tx_ba, hi_u8 tid); 48 hi_u16 hmac_mgmt_encap_addba_rsp(hmac_vap_stru *hmac_vap, hi_u8 *puc_data, hmac_ba_rx_stru *addba_rsp, hi_u8 tid, 49 hi_u8 status); 50 hi_u16 hmac_mgmt_encap_delba(hmac_vap_stru *hmac_vap, hi_u8 *puc_data, const mac_action_mgmt_args_stru *action_args); 51 hi_u32 hmac_mgmt_rx_addba_req(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, const hi_u8 *puc_payload); 52 hi_u32 hmac_mgmt_rx_addba_rsp(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, const hi_u8 *puc_payload); 53 hi_u32 hmac_mgmt_rx_delba(const hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, const hi_u8 *puc_payload); 54 hi_u32 hmac_mgmt_tx_addba_req(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, 55 const mac_action_mgmt_args_stru *action_args); 56 hi_u32 hmac_mgmt_tx_addba_rsp(hmac_vap_stru *hmac_vap, const hmac_user_stru *hmac_user, hmac_ba_rx_stru *ba_rx_info, 57 hi_u8 tid, hi_u8 status); 58 hi_u32 hmac_mgmt_tx_delba(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, 59 const mac_action_mgmt_args_stru *action_args); 60 hi_u32 hmac_mgmt_tx_addba_timeout(hi_void *arg); 61 hi_u32 hmac_mgmt_tx_ampdu_start(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, mac_priv_req_args_stru *priv_req); 62 hi_u32 hmac_mgmt_tx_ampdu_end(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, mac_priv_req_args_stru *priv_req); 63 64 #ifdef _PRE_WLAN_FEATURE_PMF 65 hi_u32 hmac_sa_query_interval_timeout(hi_void *arg); 66 hi_void hmac_send_sa_query_rsp(mac_vap_stru *mac_vap, hi_u8 *hdr, hi_u8 is_protected); 67 hi_u32 hmac_start_sa_query(mac_vap_stru *mac_vap, hmac_user_stru *hmac_user, hi_u8 is_protected); 68 hi_u32 hmac_pmf_check_err_code(const mac_user_stru *user_base_info, hi_u8 is_protected, const hi_u8 *puc_mac_hdr); 69 #endif 70 hi_u32 hmac_tx_mgmt_send_event(const mac_vap_stru *mac_vap, oal_netbuf_stru *mgmt_frame, hi_u32 us_frame_len); 71 hi_void hmac_mgmt_update_assoc_user_qos(hi_u8 *puc_payload, hi_u16 us_msg_len, hi_u16 us_info_elem_offset, 72 const hmac_user_stru *hmac_user); 73 hi_void hmac_set_user_protocol_mode(const mac_vap_stru *mac_vap, hmac_user_stru *hmac_user); 74 hi_u32 hmac_mgmt_reset_psm(const mac_vap_stru *mac_vap, hi_u8 user_id); 75 #ifdef _PRE_WLAN_FEATURE_OPMODE_NOTIFY 76 hi_u32 hmac_ie_proc_opmode_field(mac_vap_stru *mac_vap, mac_user_stru *mac_user, mac_opmode_notify_stru *opmode_notify, 77 hi_u8 mgmt_frm_type); 78 #endif 79 hi_u32 hmac_keepalive_set_interval(mac_vap_stru *mac_vap, hi_u16 us_keepalive_interval); 80 hi_u32 hmac_keepalive_set_limit(mac_vap_stru *mac_vap, hi_u32 us_keepalive_limit); 81 82 #ifdef _PRE_WLAN_FEATURE_PMF 83 hi_void hmac_rx_sa_query_req(hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf, hi_u8 is_protected); 84 hi_void hmac_rx_sa_query_rsp(hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf, hi_u8 is_protected); 85 #endif 86 #ifdef _PRE_WLAN_FEATURE_OPMODE_NOTIFY 87 hi_u32 hmac_mgmt_rx_opmode_notify_frame(hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf); 88 #endif 89 hi_void hmac_send_mgmt_to_host(const hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf, hi_u16 us_len, hi_s32 l_freq); 90 hi_void hmac_rx_mgmt_send_to_host(const hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf); 91 #ifdef _PRE_WLAN_FEATURE_ANY 92 hi_u32 hmac_any_tx_event_status(mac_vap_stru *mac_vap, hi_u8 len, const hi_u8 *puc_param); 93 hi_u32 hmac_any_get_peer_info(mac_vap_stru *mac_vap, hi_u8 len, const hi_u8 *puc_param); 94 #endif 95 hi_u32 hmac_mgmt_tx_event_status(mac_vap_stru *mac_vap, hi_u8 len, const hi_u8 *puc_param); 96 #ifdef _PRE_WLAN_FEATURE_AMPDU_VAP 97 hi_void hmac_rx_ba_session_decr(hmac_vap_stru *hmac_vap); 98 hi_void hmac_tx_ba_session_decr(hmac_vap_stru *hmac_vap); 99 #else 100 hi_void hmac_rx_ba_session_decr(hmac_device_stru *hmac_dev); 101 hi_void hmac_tx_ba_session_decr(hmac_device_stru *hmac_dev); 102 #endif 103 hi_void hmac_mgmt_rx_action_ba(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, const hi_u8 *puc_data); 104 hi_void hmac_vap_set_user_avail_rates(mac_vap_stru *mac_vap, hmac_user_stru *hmac_user); 105 hi_u32 hmac_proc_ht_cap_ie(mac_vap_stru *mac_vap, mac_user_stru *mac_user, const hi_u8 *puc_ht_cap_ie); 106 hi_void hmac_mgmt_send_deauth_frame(mac_vap_stru *mac_vap, const hi_u8 *da_mac_addr, hi_u8 addr_len, hi_u16 err_code); 107 hi_void hmac_mgmt_send_disassoc_frame(mac_vap_stru *mac_vap, const hi_u8 *da_mac_addr, hi_u16 err_code, 108 hi_u8 is_protected); 109 hi_u32 hmac_wpas_mgmt_tx(mac_vap_stru *mac_vap, hi_u16 us_len, const hi_u8 *puc_param); 110 hi_u8 hmac_get_auc_avail_protocol_mode(wlan_protocol_enum_uint8 vap_protocol, wlan_protocol_enum_uint8 user_protocol); 111 112 #if (_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC == _PRE_MULTI_CORE_MODE) 113 hi_u8 hmac_get_g_ul_print_wakeup_mgmt(hi_void); 114 hi_void hmac_set_g_ul_print_wakeup_mgmt(hi_u8 print_wakeup_mgmt); 115 #endif 116 117 #ifdef __cplusplus 118 #if __cplusplus 119 } 120 #endif 121 #endif 122 123 #endif /* __HMAC_MGMT_BSS_COMM_H__ */ 124