• 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 __WAL_CFG80211_APT_H__
20 #define __WAL_CFG80211_APT_H__
21 
22 #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
23 /* ****************************************************************************
24   1 其他头文件包含
25 **************************************************************************** */
26 #ifndef HAVE_PCLINT_CHECK
27 #include "hi_wifi_driver_wpa_if.h"
28 #endif
29 #include "oam_ext_if.h"
30 #include "oal_ext_if.h"
31 #include "wal_event.h"
32 #include "oal_cfg80211.h"
33 
34 #ifdef __cplusplus
35 #if __cplusplus
36 extern "C" {
37 #endif
38 #endif
39 
40 /* ****************************************************************************
41   2 宏定义
42 **************************************************************************** */
43 /* ****************************************************************************
44   3 枚举定义
45 **************************************************************************** */
46 /* ****************************************************************************
47   4 全局变量声明
48 **************************************************************************** */
49 /* ****************************************************************************
50   5 消息头定义
51 **************************************************************************** */
52 /* ****************************************************************************
53   6 消息定义
54 **************************************************************************** */
55 /* ****************************************************************************
56   7 STRUCT定义
57 **************************************************************************** */
58 /* ****************************************************************************
59   8 UNION定义
60 **************************************************************************** */
61 /* ****************************************************************************
62   9 OTHERS定义
63 **************************************************************************** */
64 typedef hi_s32 (*hisi_upload_frame_cb)(hi_void *recv_buf, hi_s32 frame_len, hi_s8 rssi);
65 
66 /* ****************************************************************************
67   10 函数声明
68 **************************************************************************** */
69 hi_u32 cfg80211_new_sta(const oal_net_device_stru *netdev, const hi_u8 *mac_addr, hi_u8 addr_len,
70     const oal_station_info_stru *sinfo);
71 hi_u32 cfg80211_del_sta(oal_net_device_stru *netdev, const hi_u8 *mac_addr, hi_u8 addr_len);
72 hi_u8 cfg80211_mgmt_tx_status(struct wireless_dev *wdev, const hi_u8 *puc_buf, size_t len, hi_u8 ack);
73 hi_void cfg80211_inform_bss_frame(const oal_net_device_stru *netdev, oal_wiphy_stru *wiphy,
74     const oal_ieee80211_channel_stru *ieee80211_channel, const wal_scanned_bss_info_stru *scanned_bss_info);
75 hi_void cfg80211_connect_result(const oal_net_device_stru *netdev, const oal_connet_result_stru *connet_result);
76 hi_u32 cfg80211_disconnected(const oal_net_device_stru *netdev, hi_u16 us_reason, const hi_u8 *puc_ie, hi_u32 ie_len);
77 hi_u32 cfg80211_timeout_disconnected(const oal_net_device_stru *netdev);
78 hi_void cfg80211_scan_done(const oal_net_device_stru *netdev, hisi_scan_status_enum status);
79 hi_u8 cfg80211_rx_mgmt(const oal_net_device_stru *netdev, hi_s32 freq, hi_s32 l_sig_mbm, const hi_u8 *puc_buf,
80     size_t len);
81 hi_u32 cfg80211_csa_channel_switch(const oal_net_device_stru *netdev, hi_s32 freq);
82 hi_u32 cfg80211_remain_on_channel(const oal_net_device_stru *netdev, hi_u32 freq, hi_u32 duration);
83 hi_u32 cfg80211_cancel_remain_on_channel(const oal_net_device_stru *netdev, hi_u32 freq);
84 
85 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
86 hi_u32 cfg80211_rx_mgmt_ext(const oal_net_device_stru *netdev, hi_s32 freq, const hi_u8 *puc_buf, hi_u32 len);
87 hi_void cfg80211_rx_exception(const oal_net_device_stru *netdev, hi_u8 *puc_data, hi_u32 data_len);
88 hi_u32 cfg80211_mic_failure(const oal_net_device_stru *netdev, const hmac_mic_event_stru *mic_event,
89     const hi_u8 *puc_tsc, oal_gfp_enum_uint8 gfp);
90 hi_void cfg80211_kobject_uevent_env_sta_join(oal_net_device_stru *netdev, const hi_u8 *mac_addr, hi_u8 addr_len);
91 hi_void cfg80211_kobject_uevent_env_sta_leave(oal_net_device_stru *netdev, const hi_u8 *mac_addr, hi_u8 addr_len);
92 #endif
93 
94 #ifdef _PRE_WLAN_FEATURE_MESH
95 hi_u32 cfg80211_mesh_close(const oal_net_device_stru *netdev, const hi_u8 *mac_addr, hi_u8 addr_len, hi_u16 us_reason);
96 hi_u32 cfg80211_mesh_new_peer_candidate(const oal_net_device_stru *netdev,
97     const hmac_report_new_peer_candidate_stru *puc_new_peer);
98 #endif
99 
100 #ifdef _PRE_WLAN_FEATURE_PROMIS
101 hi_u32 hisi_wlan_register_upload_frame_cb(hisi_upload_frame_cb func);
102 hi_u32 hwal_send_others_bss_data(const oal_netbuf_stru *netbuf);
103 #endif
104 
105 #ifdef __cplusplus
106 #if __cplusplus
107 }
108 #endif
109 #endif
110 #endif /* #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION) */
111 #endif /* __WAL_CFG80211_APT_H__ */
112