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_CHAN_MGMT_H__ 20 #define __HMAC_CHAN_MGMT_H__ 21 22 /* **************************************************************************** 23 1 其他头文件包含 24 **************************************************************************** */ 25 #include "hmac_vap.h" 26 27 #ifdef __cplusplus 28 #if __cplusplus 29 extern "C" { 30 #endif 31 #endif 32 33 /* **************************************************************************** 34 3 枚举定义 35 **************************************************************************** */ 36 typedef enum { 37 MAC_CHNL_AV_CHK_NOT_REQ = 0, /* 不需要进行信道扫描 */ 38 MAC_CHNL_AV_CHK_IN_PROG = 1, /* 正在进行信道扫描 */ 39 MAC_CHNL_AV_CHK_COMPLETE = 2, /* 信道扫描已完成 */ 40 41 MAC_CHNL_AV_CHK_BUTT, 42 } mac_chnl_av_chk_enum; 43 typedef hi_u8 mac_chnl_av_chk_enum_uint8; 44 45 /* **************************************************************************** 46 4 STRUCT定义 47 **************************************************************************** */ 48 typedef struct { 49 hi_u16 us_freq; /* 信道频点 */ 50 hi_u8 idx; /* 信道索引号 */ 51 hi_u8 auc_resv; 52 } hmac_dfs_channel_info_stru; 53 54 typedef struct { 55 hi_u16 us_freq; /* 中心频率,单位MHz */ 56 hi_u8 number; /* 信道号 */ 57 hi_u8 idx; /* 信道索引(软件用) */ 58 } mac_freq_channel_map_stru; 59 60 /* **************************************************************************** 61 5 函数声明 62 **************************************************************************** */ 63 hi_void hmac_chan_disable_machw_tx(const mac_vap_stru *mac_vap); 64 hi_void hmac_chan_multi_select_channel_mac(mac_vap_stru *mac_vap, hi_u8 channel, 65 wlan_channel_bandwidth_enum_uint8 bandwidth); 66 mac_chnl_av_chk_enum_uint8 hmac_chan_do_channel_availability_check(mac_device_stru *mac_dev, mac_vap_stru *mac_vap, 67 hi_u8 first_time); 68 hi_u32 hmac_start_bss_in_available_channel(hmac_vap_stru *hmac_vap); 69 70 hi_u32 hmac_chan_restart_network_after_switch(const mac_vap_stru *mac_vap); 71 hi_void hmac_chan_multi_switch_to_new_channel(hi_u8 channel, wlan_channel_bandwidth_enum_uint8 bandwidth); 72 hi_void hmac_dfs_set_channel(mac_vap_stru *mac_vap, hi_u8 channel); 73 74 hi_u32 hmac_ie_proc_ch_switch_ie(mac_vap_stru *mac_vap, const hi_u8 *puc_payload, mac_eid_enum_uint8 eid_type); 75 hi_u32 hmac_chan_switch_to_new_chan_complete(frw_event_mem_stru *event_mem); 76 hi_void hmac_chan_sync(mac_vap_stru *mac_vap, hi_u8 channel, wlan_channel_bandwidth_enum_uint8 bandwidth, 77 hi_u8 switch_immediately); 78 hi_u32 hmac_dbac_status_notify(frw_event_mem_stru *event_mem); 79 hi_u32 hmac_chan_start_bss(hmac_vap_stru *hmac_vap); 80 hi_void hmac_channel_switch_report_event(const hmac_vap_stru *hmac_vap, hi_s32 l_freq); 81 mac_freq_channel_map_stru get_ast_freq_map_2g_elem(hi_u32 index); 82 83 #ifdef __cplusplus 84 #if __cplusplus 85 } 86 #endif 87 #endif 88 89 #endif /* end of hmac_chan_mgmt.h */ 90