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_SCAN_H__ 20 #define __HMAC_SCAN_H__ 21 22 /* **************************************************************************** 23 1 其他头文件包含 24 **************************************************************************** */ 25 #include "oal_ext_if.h" 26 #include "hmac_vap.h" 27 #include "mac_device.h" 28 #include "hmac_device.h" 29 30 #ifdef __cplusplus 31 #if __cplusplus 32 extern "C" { 33 #endif 34 #endif 35 36 /* **************************************************************************** 37 2 宏定义 38 **************************************************************************** */ 39 /* 扫描到的bss的老化时间,小于此值,下发新扫描请求时,不删除此bss信息 */ 40 #define HMAC_SCAN_MAX_SCANNED_BSS_EXPIRE 3000 /* 3000 milliseconds */ 41 /* 扫描到的bss的rssi老化时间 */ 42 #define HMAC_SCAN_MAX_SCANNED_RSSI_EXPIRE 1000 /* 1000 milliseconds */ 43 /* 前景扫描每个信道扫描次数 */ 44 #define FGSCAN_SCAN_CNT_PER_CHANNEL 2 45 46 /* **************************************************************************** 47 3 函数声明 48 **************************************************************************** */ 49 hmac_scanned_bss_info *hmac_scan_find_scanned_bss_by_bssid(const hmac_bss_mgmt_stru *bss_mgmt, const hi_u8 *puc_bssid); 50 hi_u32 hmac_scan_proc_scanned_bss(frw_event_mem_stru *event_mem); 51 hi_u32 hmac_scan_proc_scan_comp_event(frw_event_mem_stru *event_mem); 52 hi_u32 hmac_scan_proc_scan_req_event_exception(hmac_vap_stru *hmac_vap); 53 hi_u32 hmac_scan_proc_scan_req_event(hmac_vap_stru *hmac_vap, mac_scan_req_stru *scan_params); 54 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION) 55 hi_u32 hmac_scan_proc_sched_scan_req_event(const hmac_vap_stru *hmac_vap, const mac_pno_scan_stru *pno_scan_params); 56 #endif 57 hi_void hmac_scan_init(hmac_device_stru *hmac_dev); 58 hi_void hmac_scan_exit(hmac_device_stru *hmac_dev); 59 hi_void hmac_scan_proc_check_ssid(hmac_scanned_bss_info *scanned_bss, const hi_u8 *puc_ssid, hi_u8 ssid_len); 60 hi_void hmac_scan_set_sour_mac_addr_in_probe_req(const hmac_vap_stru *hmac_vap, hi_u8 *sa_mac_addr, hi_u8 mac_addr_len, 61 hi_u8 is_rand_mac_addr_scan, hi_u8 is_p2p0_scan); 62 #ifdef _PRE_WLAN_FEATURE_QUICK_START 63 hi_u32 hmac_scan_update_bss_dscr(hmac_scanned_bss_info *scanned_bss, const dmac_tx_event_stru *dtx_event, hi_u8 vap_id); 64 hi_void hmac_scan_add_bss_to_list(hmac_scanned_bss_info *scanned_bss, hmac_device_stru *hmac_dev); 65 hmac_scanned_bss_info *hmac_scan_alloc_scanned_bss(hi_u32 mgmt_len); 66 hi_void hmac_scan_clean_scan_record(hmac_scan_record_stru *scan_record); 67 #endif 68 hi_u32 hmac_scan_clean_result(mac_vap_stru *mac_vap, hi_u16 us_len, const hi_u8 *puc_param); 69 70 #ifdef __cplusplus 71 #if __cplusplus 72 } 73 #endif 74 #endif 75 76 #endif /* __HMAC_SCAN_H__ */ 77