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 * Description: Header file 15 */ 16 17 #ifndef MSG_USER_MANAGE_ROM_H 18 #define MSG_USER_MANAGE_ROM_H 19 20 #include "osal_types.h" 21 #include "mac_user_common_rom.h" 22 #include "wlan_types_base_rom.h" 23 24 /* 25 * hmac向dmac同步速率集合信息时,使用的结构体大小超出了事件内存的大小,导致事件同步有可能失败。 26 * 单独定义结构体mac_h2d_user_rate_info_stru,保证mac_h2d_usr_info_stru不超过限制 27 */ 28 typedef struct { 29 osal_u16 user_idx; 30 osal_u16 amsdu_maxsize; 31 32 mac_he_hdl_stru he_hdl; 33 /* vht速率集信息 */ 34 mac_vht_hdl_stru vht_hdl; 35 36 /* ht速率集信息 */ 37 mac_user_ht_hdl_stru ht_hdl; 38 39 /* legacy速率集信息 */ 40 osal_u8 avail_rs_nrates; 41 osal_u8 resv[3]; /* 保留3字节对齐 */ 42 osal_u8 avail_rs_rates[WLAN_MAX_SUPP_RATES]; 43 } mac_h2d_usr_rate_info_stru; 44 45 typedef enum { 46 MAC_AP_TYPE_NORMAL = 0, 47 MAC_AP_TYPE_GOLDENAP = 1, 48 MAC_AP_TYPE_DDC_WHITELIST = 2, 49 MAC_AP_TYPE_BTCOEX_PS_BLACKLIST = 3, /* 这里是探测双天线ap,和ddc互斥,可以直接后面添加 */ 50 51 MAC_AP_TYPE_BUTT 52 } mac_ap_type_enum; 53 typedef osal_u8 mac_ap_type_enum_uint8; 54 55 /* 添加用户事件payload结构体 */ 56 typedef struct { 57 osal_u16 user_idx; /* 用户index */ 58 osal_u8 user_mac_addr[WLAN_MAC_ADDR_LEN]; 59 osal_u16 sta_aid; 60 osal_u8 bssid[WLAN_MAC_ADDR_LEN]; 61 mac_he_hdl_stru he_hdl; 62 mac_vht_hdl_stru vht_hdl; 63 mac_user_ht_hdl_stru ht_hdl; 64 mac_ap_type_enum_uint8 ap_type; 65 osal_s8 rssi; /* 用户bss的信号强度 */ 66 mac_user_type_enum_uint8 user_type; 67 osal_u8 lut_index; /* user对应的硬件索引,活跃用户id */ 68 osal_u8 rev; 69 } hmac_ctx_add_user_stru; 70 71 /* 删除用户事件结构体 */ 72 typedef struct { 73 osal_u16 user_idx; /* 用户index */ 74 osal_u8 user_mac_addr[WLAN_MAC_ADDR_LEN]; 75 mac_user_type_enum_uint8 user_type; 76 mac_ap_type_enum_uint8 ap_type; 77 osal_u8 resv[2]; /* 修复删除del新增成员,结构大小尽量不要超过event第一级内存72字节 */ 78 } hmac_ctx_del_user_stru; 79 80 /* 需要从ko侧同步到device侧的结构体成员 */ 81 typedef struct { 82 osal_u16 assoc_id; 83 osal_u8 user_mac_addr[WLAN_MAC_ADDR_LEN]; 84 85 wlan_ciper_protocol_type_enum_uint8 cipher_type; 86 /* 算法使用 start */ 87 osal_u8 avail_protocol_mode : 4; /* 用户和VAP协议模式交集, 供算法调用 */ 88 osal_u8 avail_bandwidth : 4; /* 用户和VAP带宽能力交集,供算法调用 */ 89 osal_u8 cur_bandwidth : 4; /* 默认值与en_avail_bandwidth相同,供算法调用修改 */ 90 osal_u8 avail_num_spatial_stream : 3; /* Tx和Rx支持Nss的交集,供算法调用 */ 91 osal_u8 vip_flag : 1; /* 只算法调度用,通过配置命令配置,TRUE: VIP用户, FALSE: 非VIP用户 */ 92 osal_u8 user_num_spatial_stream : 3; /* 用户支持的空间流个数 */ 93 osal_u8 avail_bf_num_spatial_stream : 3; /* 用户支持的Beamforming空间流个数 */ 94 osal_u8 is_multi_user : 1; 95 osal_u8 qos : 1; 96 osal_u8 protocol_mode : 4; 97 osal_u8 cur_protocol_mode : 4; /* 默认值与en_avail_protocol_mode值相同, 供算法调用修改 */ 98 mac_user_asoc_state_enum_uint8 user_asoc_state; /* 用户关联状态 */ 99 100 /* 算法使用 end */ 101 osal_u8 lut_index; 102 osal_u8 resv1[3]; 103 mac_user_tx_param_stru user_tx_info; /* TX相关参数 */ 104 mac_key_mgmt_stru key_info; 105 } mac_user_info_h2d_sync_stru; 106 107 #endif