1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * 文 件 名 : hmac_roam_main.h 15 * 生成日期 : 2015年3月18日 16 * 功能描述 : hmac_roam_main.c 的头文件 17 */ 18 19 #ifndef __HMAC_ROAM_MAIN_H__ 20 #define __HMAC_ROAM_MAIN_H__ 21 22 #include "oam_ext_if.h" 23 #include "hmac_vap.h" 24 #include "hmac_roam_alg.h" 25 26 #ifdef __cplusplus 27 #if __cplusplus 28 extern "C" { 29 #endif 30 #endif 31 32 /***************************************************************************** 33 1 其他头文件包含 34 *****************************************************************************/ 35 36 37 #undef THIS_FILE_ID 38 #define THIS_FILE_ID OAM_FILE_ID_HMAC_ROAM_MAIN_H 39 /***************************************************************************** 40 2 宏定义 41 *****************************************************************************/ 42 #define ROAM_SCAN_TIME_MAX (3 * 1000) /* 扫描超时时间 单位ms */ 43 #define ROAM_CONNECT_TIME_MAX (10 * 1000) /* 关联超时时间 单位ms */ 44 #define ROAM_INVALID_SCAN_MAX (5) /* 连续无效扫描门限 */ 45 46 /* 漫游场景识别,识别出密集AP场景和低密AP场景 */ 47 #define WLAN_FULL_CHANNEL_NUM (20) /* 判断全信道扫描的数目门限 */ 48 #define ROAM_ENV_CANDIDATE_GOOD_NUM (5) /* 统计漫游环境中强信号强度AP的个数 */ 49 #define ROAM_ENV_CANDIDATE_WEAK_NUM (10) /* 统计漫游环境中弱信号强度AP的个数 */ 50 #define ROAM_ENV_RSSI_NE60_DB (-60) /* 漫游环境中强信号强度AP RSSI的门限 */ 51 #define ROAM_ENV_DENSE_TO_SPARSE_PERIOD (5) /* 从高密场景向低密场景切换的扫描周期 */ 52 53 /* 漫游场景识别,识别出不满足漫游门限、但是有更好信号强度AP的场景 */ 54 #define ROAM_ENV_BETTER_RSSI_PERIOD (5) /* 不满足漫游门限,但是有更好信号强度AP的扫描周期 */ 55 #define ROAM_ENV_BETTER_RSSI_DISTANSE (20) /* 同一个ESS中最强信号强度AP和当前关联AP的RSSI间隔 */ 56 #define ROAM_RSSI_LINKLOSS_TYPE (-121) 57 58 /***************************************************************************** 59 3 枚举定义 60 *****************************************************************************/ 61 62 #define ROAM_BAND_2G_BIT BIT0 63 #define ROAM_BAND_5G_BIT BIT1 64 65 /***************************************************************************** 66 4 全局变量声明 67 *****************************************************************************/ 68 69 70 /***************************************************************************** 71 5 消息头定义 72 *****************************************************************************/ 73 74 75 /***************************************************************************** 76 6 消息定义 77 *****************************************************************************/ 78 79 80 /***************************************************************************** 81 7 STRUCT定义 82 *****************************************************************************/ 83 84 85 /***************************************************************************** 86 8 UNION定义 87 *****************************************************************************/ 88 89 90 /***************************************************************************** 91 9 OTHERS定义 92 *****************************************************************************/ 93 94 95 /***************************************************************************** 96 10 函数声明 97 *****************************************************************************/ 98 99 osal_void hmac_roam_main_clear(hmac_roam_info_stru *roam_info); 100 osal_void hmac_roam_main_change_state(hmac_roam_info_stru *roam_info, roam_main_state_enum_uint8 state); 101 osal_u32 hmac_roam_connect_to_bss(hmac_roam_info_stru *roam_info, osal_void *p_param); 102 hmac_roam_info_stru *hmac_get_roam_info(osal_u8 vap_id); 103 osal_void hmac_roam_main_del_timer(hmac_roam_info_stru *roam_info); 104 osal_u32 hmac_roam_main_fsm_action_etc(hmac_roam_info_stru *roam_info, roam_main_fsm_event_type_enum event, 105 osal_void *p_param); 106 osal_u32 hmac_roam_start_etc(hmac_vap_stru *hmac_vap, roam_channel_org_enum scan_type, 107 oal_bool_enum_uint8 cur_bss_ignore, roam_trigger_enum_uint8 roam_trigger); 108 osal_u32 hmac_roam_pause_user_etc(hmac_vap_stru *hmac_vap); 109 osal_void hmac_roam_connect_change_state(hmac_roam_info_stru *roam_info, 110 roam_connect_state_enum_uint8 state); 111 osal_u32 hmac_roam_connect_check_state(hmac_roam_info_stru *roam_info, 112 mac_vap_state_enum_uint8 vap_state, 113 roam_main_state_enum_uint8 main_state, 114 roam_connect_state_enum_uint8 connect_state); 115 osal_void hmac_roam_connect_start_timer(hmac_roam_info_stru *roam_info, osal_u32 timeout); 116 osal_u32 hmac_roam_connect_fail(hmac_roam_info_stru *roam_info); 117 osal_u32 hmac_roam_connect_succ(hmac_roam_info_stru *roam_info, osal_void *param); 118 osal_u32 hmac_roam_connect_fsm_action_etc(hmac_roam_info_stru *roam_info, 119 roam_connect_fsm_event_type_enum event, osal_void *p_param); 120 osal_u32 hmac_roam_send_reassoc_req(hmac_roam_info_stru *roam_info); 121 122 #ifdef __cplusplus 123 #if __cplusplus 124 } 125 #endif 126 #endif 127 128 #endif /* end of hmac_roam_main.h */ 129