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 */ 15 16 #ifndef __HMAC_MBO_H__ 17 #define __HMAC_MBO_H__ 18 19 /***************************************************************************** 20 1 其他头文件包含 21 *****************************************************************************/ 22 #include "hmac_11v.h" 23 #include "hmac_device.h" 24 #include "hmac_11k.h" 25 26 #ifdef __cplusplus 27 #if __cplusplus 28 extern "C" { 29 #endif 30 #endif 31 32 #undef THIS_FILE_ID 33 #define THIS_FILE_ID OAM_FILE_ID_HMAC_MBO_H 34 35 /***************************************************************************** 36 2 宏定义 37 *****************************************************************************/ 38 #define MAX_STA_MBO_IE_LEN 9 39 #define MAC_GLOBAL_OPERATING_CLASS_115_CH_NUMS 4 /* global operating class 115对应的信道集个数 */ 40 #define HMAC_11V_MBO_RE_ASSOC_DALAY_TIME_S_TO_MS 1000 41 42 /***************************************************************************** 43 3 枚举定义 44 *****************************************************************************/ 45 typedef enum { 46 MAC_GLOBAL_OPERATING_CLASS_NUMBER81 = 81, 47 MAC_GLOBAL_OPERATING_CLASS_NUMBER115 = 115, 48 49 MAC_GLOBAL_OPERATING_CLASS_BUFF, 50 } mac_global_operaing_class_enum; 51 52 /***************************************************************************** 53 4 全局变量声明 54 *****************************************************************************/ 55 56 /***************************************************************************** 57 5 消息头定义 58 *****************************************************************************/ 59 60 /***************************************************************************** 61 6 消息定义 62 *****************************************************************************/ 63 64 /***************************************************************************** 65 7 STRUCT定义 66 *****************************************************************************/ 67 typedef struct { 68 osal_u8 mbo_cell_capa; /* MBO STA移动数据能力 */ 69 osal_u8 mbo_assoc_disallowed_test_switch; 70 osal_u8 disable_connect; /* 是否发送re-assoc req帧给对应BSS标志位 */ 71 osal_u8 resv0; 72 osal_u32 btm_req_received_time; /* 收到BTM Req帧的时间 */ 73 osal_u32 reassoc_delay_time; /* Neighbor元素中获得的re-assoc delay time ms */ 74 osal_u8 reassoc_delay_bss_mac_addr[WLAN_MAC_ADDR_LEN]; /* 有re-assoc delay的BSS地址 */ 75 osal_u8 resv1[2]; 76 } mac_mbo_para_stru; 77 /***************************************************************************** 78 8 UNION定义 79 *****************************************************************************/ 80 81 /***************************************************************************** 82 9 OTHERS定义 83 *****************************************************************************/ 84 85 /***************************************************************************** 86 10 inline函数定义 87 *****************************************************************************/ 88 89 /***************************************************************************** 90 11 函数声明 91 *****************************************************************************/ 92 typedef osal_void (*hmac_mbo_assoc_add_mbo_and_soc_ie_cb)(hmac_vap_stru *hmac_vap, 93 osal_u8 *buffer, osal_u8 *ie_len, hmac_scanned_bss_info *scaned_bss); 94 typedef osal_void (*hmac_handle_ie_specific_mbo_cb)(osal_u8 *ie_data, 95 hmac_neighbor_bss_info_stru *bss_list_alloc, osal_u8 bss_list_index); 96 typedef osal_u32 (*hmac_mbo_check_is_assoc_or_re_assoc_allowed_cb)(hmac_vap_stru *hmac_vap, 97 mac_conn_param_stru *connect_param, mac_bss_dscr_stru *bss_dscr); 98 typedef osal_void (*hmac_scan_update_bss_assoc_disallowed_attr_cb)(hmac_vap_stru *hmac_vap, 99 mac_bss_dscr_stru *bss_dscr, osal_u8 *frame_body, osal_u16 frame_len); 100 typedef osal_void (*hmac_set_bss_re_assoc_delay_params_cb)(const hmac_bsst_req_info_stru *bsst_req_info, 101 const hmac_user_stru *hmac_user, hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 need_roam); 102 typedef osal_void (*hmac_roam_attach_mbo_ie_auth_cb)(hmac_vap_stru *hmac_vap, 103 osal_u8 *mgmt_frame, osal_u16 *auth_len, mac_bss_dscr_stru *bss_dscr); 104 typedef osal_void (*hmac_vap_mbo_update_rrm_scan_params_cb)(const mac_bcn_req_stru *bcn_req, 105 mac_scan_req_stru *scan_req); 106 typedef osal_void (*hmac_mbo_modify_chan_param_cb)(osal_u8 optclass, 107 wlan_channel_band_enum_uint8 *chan_band, osal_u8 *chan_count); 108 typedef osal_u32 (*hmac_mbo_check_neighbor_subie_len_cb)(osal_u8 *ie_data, osal_u8 sub_ie_len); 109 typedef osal_void (*hmac_mbo_scan_add_mbo_ie_cb)(hmac_vap_stru *hmac_vap, osal_u8 *app_ie, osal_u8 *ie_len); 110 typedef osal_void (*hmac_remove_mbo_ie_cb)(hmac_vap_stru *hmac_vap, osal_u8 *ies, osal_s32 *ie_len); 111 112 static osal_u32 hmac_mbo_sta_init_weakref(osal_void) __attribute__ ((weakref("hmac_mbo_sta_init"), used)); 113 static osal_void hmac_mbo_sta_deinit_weakref(osal_void) __attribute__ ((weakref("hmac_mbo_sta_deinit"), used)); 114 115 #ifdef __cplusplus 116 #if __cplusplus 117 } 118 #endif 119 #endif 120 121 #endif /* end of hmac_mob.h */ 122