WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hmac_user.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2012-2023. All rights reserved.
3 * 文 件 名 : hmac_user.h
4 * 生成日期 : 2012年10月19日
5 * 功能描述 : hmac_user.c 的头文件
6 */
7
8
9#ifndef __HMAC_USER_H__
10#define __HMAC_USER_H__
11
12/*****************************************************************************
13 1 其他头文件包含
14*****************************************************************************/
15#include "hmac_ext_if.h"
16#include "mac_resource_ext.h"
17#include "hmac_tid.h"
18#include "frw_hmac.h"
19#include "msg_user_manage_rom.h"
20
21#ifdef __cplusplus
22#if __cplusplus
23extern "C" {
24#endif
25#endif
26
27#undef THIS_FILE_ID
28#define THIS_FILE_ID OAM_FILE_ID_HMAC_USER_H
29
30/*****************************************************************************
31 2 宏定义
32*****************************************************************************/
33#define HMAC_ADDBA_EXCHANGE_ATTEMPTS 10 /* 试图建立ADDBA会话的最大允许次数 */
34
35#define hmac_user_is_amsdu_support(_user, _tid) (((_user)->amsdu_supported) & (0x01 << ((_tid) & 0x07)))
36
37#define hmac_user_set_amsdu_support(_user, _tid) (((_user)->amsdu_supported) |= (0x01 << ((_tid) & 0x07)))
38
39#define hmac_user_set_amsdu_not_support(_user, _tid) \
40 (((_user)->amsdu_supported) &= (osal_u8)(~(0x01 << ((_tid) & 0x07))))
41
42#define hmac_user_stats_pkt_incr(_member, _cnt) ((_member) += (_cnt))
43
44/*****************************************************************************
45 3 枚举定义
46*****************************************************************************/
47
48/*****************************************************************************
49 4 全局变量声明
50*****************************************************************************/
51
52
53/*****************************************************************************
54 5 消息头定义
55*****************************************************************************/
56
57
58/*****************************************************************************
59 6 消息定义
60*****************************************************************************/
61
62
63/*****************************************************************************
64 7 STRUCT定义
65*****************************************************************************/
66
67/* SA Query 超时定时器 和 间隔定时器 的超时函数入参结构 */
68typedef struct {
69 hmac_vap_stru *hmac_vap; /* 发送SA Query request的mac vap信息 */
70 hmac_user_stru *hmac_user; /* 目标user */
72typedef struct {
73 hmac_vap_stru *hmac_vap; /* 发送SA Query request的mac vap信息 */
74 hmac_user_stru *hmac_user; /* 目标user */
75 oal_bool_enum_uint8 is_protected; /* SA Query管理帧加密的使能开关 */
76 osal_u16 trans_id; /* SA Query request帧的trans id */
78
79/* 存储AP关联请求帧的ie信息,用于上报内核 */
85
86
87/*****************************************************************************
88 8 UNION定义
89*****************************************************************************/
90
91
92/*****************************************************************************
93 9 OTHERS定义
94*****************************************************************************/
95/*****************************************************************************
96 函 数 名 : hmac_user_ht_support
97 功能描述 : 是否为HT用户
98 返 回 值 : OAL_TRUE是,OAL_FALSE不是
99*****************************************************************************/
101{
102 if (hmac_user->ht_hdl.ht_capable == OAL_TRUE) {
103 return OAL_TRUE;
104 }
105
106 return OAL_FALSE;
107}
108
109/*****************************************************************************
110 函 数 名 : hmac_user_xht_support
111 功能描述 : 是否支持ht/vht聚合
112 输入参数 : hmac_user_stru *hmac_user
113 返 回 值 : OAL_STATIC OAL_INLINE oal_bool_enum_uint8
114*****************************************************************************/
116{
117 if ((hmac_user->cur_protocol_mode >= WLAN_HT_MODE) &&
118 (hmac_user->cur_protocol_mode < WLAN_PROTOCOL_BUTT)) {
119 return OAL_TRUE;
120 }
121
122 return OAL_FALSE;
123}
124
125/*****************************************************************************
126 10 函数声明
127*****************************************************************************/
129 osal_u32 len, osal_u8 reass_flag);
132 wlan_nss_enum_uint8 vap_nss);
134extern osal_u32 hmac_user_add_etc(hmac_vap_stru *hmac_vap, osal_u8 *mac_addr, osal_u16 *pus_user_index);
139extern osal_void hmac_tid_clear_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, osal_bool lock_free_flag);
142extern osal_u32 mac_user_init_etc(hmac_user_stru *hmac_user, osal_u16 user_idx, osal_u8 *mac_addr,
143 hmac_vap_stru *hmac_vap);
144
145// from hmac_user_rom.h
146/*****************************************************************************
147 2 宏定义
148*****************************************************************************/
149
150#define HMAC_COMPATIBILITY_PKT_NUM_LIMIT 2000
151#define HMAC_INVALID_USER_LUT_INDEX (WLAN_ACTIVE_USER_MAX_NUM) /* 无效的user lut index */
152
153/*****************************************************************************
154 3 枚举定义
155*****************************************************************************/
163
171
179
180/*****************************************************************************
181 7 STRUCT定义
182*****************************************************************************/
183typedef struct {
184 osal_u32 uapsd_tx_enqueue_count; /* hmac_uapsd_tx_enqueue调用次数 */
185 osal_u32 uapsd_tx_dequeue_count; /* 出队帧个数统计 */
186 osal_u32 uapsd_tx_enqueue_free_count; /* 入队过程中MPDU被释放的次数,一次可能释放多个MPDU */
187 osal_u32 uapsd_rx_trigger_in_sp; /* trigger检查发现处于SP中的次数 */
188 osal_u32 uapsd_rx_trigger_state_trans; /* trigger检查中发现需要状态转换的次数 */
189 osal_u32 uapsd_rx_trigger_dup_seq; /* trigger帧是重复帧的个数 */
190 osal_u32 uapsd_send_qosnull; /* 队列为空,发送qos null data的个数 */
191 osal_u32 uapsd_send_extra_qosnull; /* 最后一个为管理帧,发送额外qosnull的个数 */
192 osal_u32 uapsd_process_queue_error; /* 队列处理过程中出错的次数 */
193 osal_u32 uapsd_flush_queue_error; /* flush队列处理过程中出错的次数 */
194 osal_u32 uapsd_send_qosnull_fail; /* 发送qosnull失败次数 */
196
197typedef struct {
198 osal_u32 psm_enqueue_succ_cnt; /* psm队列成功入队帧个数 */
199 osal_u32 psm_enqueue_fail_cnt; /* psm队列入队失败被释放的帧个数 */
200 osal_u32 psm_dequeue_fail_cnt; /* psm队列出队失败的帧个数 */
201 osal_u32 psm_dequeue_succ_cnt; /* psm队列出队成功的帧个数 */
202 osal_u32 psm_send_data_fail_cnt; /* psm队列出队的数据帧发送失败个数 */
203 osal_u32 psm_send_mgmt_fail_cnt; /* psm队列出队的管理帧发送失败个数 */
204 osal_u32 psm_send_null_fail_cnt; /* AP发送null data失败的次数 */
205 osal_u32 psm_resv_pspoll_send_null; /* AP收到用户的pspoll,但是队列中没有缓存帧的次数 */
206 osal_u32 psm_rsp_pspoll_succ_cnt; /* AP收到用户的pspoll,发送缓存帧成功的次数 */
207 osal_u32 psm_rsp_pspoll_fail_cnt; /* AP收到用户的pspoll,发送缓存帧失败的次数 */
209
210
211/* 软件平均rssi统计信息结构体 */
212typedef struct {
213 osal_s32 tx_rssi; /* 记录ACK RSSI的累计值 */
214 osal_s32 rx_rssi; /* 记录接收RSSI的累计值 */
215 osal_u16 tx_rssi_stat_count; /* 发送平均rssi统计的发包数目 */
216 osal_u16 rx_rssi_stat_count; /* 接收平均rssi统计的发包数目 */
218
219/* 软件平均速率统计信息结构体 */
220typedef struct {
221 osal_u32 tx_rate; /* 记录发送速率的累计值 */
222 osal_u32 rx_rate; /* 记录接收速率的累计值 */
223 osal_u16 tx_rate_stat_count; /* 发送平均rate统计的发包数目 */
224 osal_u16 rx_rate_stat_count; /* 接收平均rate统计的发包数目 */
226
227typedef struct {
228 /* 用户基本信息 */
231
232 /* 算法用到的各个标志位 */
233 oal_bool_enum_uint8 hmac_rssi_stat_flag; /* 是否进行平均rssi统计 */
234 oal_bool_enum_uint8 hmac_rate_stat_flag; /* 是否进行平均速率统计 */
235
236 hmac_rssi_stat_info_stru dmac_rssi_stat_info; /* 软件平均rssi统计信息结构体指针 */
237 hmac_rate_stat_info_stru dmac_rate_stat_info; /* 软件平均速率统计信息结构体指针 */
239
241/*****************************************************************************
242 8 内联函数定义
243*****************************************************************************/
244/*****************************************************************************
245 函 数 名 : hmac_get_user_support_vht
246 功能描述 : 获取vht_capable字段的值
247*****************************************************************************/
248static INLINE__ osal_u8 hmac_get_user_support_vht(const hmac_user_stru *user_info)
249{
250 return ((user_info->vht_hdl.vht_capable == 1) ? OSAL_TRUE : OSAL_FALSE);
251}
252
253/*****************************************************************************
254 函 数 名 : hmac_get_user_support_ht
255 功能描述 : 获取ht_capable字段的值
256*****************************************************************************/
257static INLINE__ osal_u8 hmac_get_user_support_ht(const hmac_user_stru *user_info)
258{
259 return ((user_info->ht_hdl.ht_capable == 1) ? OSAL_TRUE : OSAL_FALSE);
260}
261
262/*****************************************************************************
263 10 函数声明
264*****************************************************************************/
271
274 mac_ieee80211_frame_stru *frame_hdr);
279
288
296
297#ifdef __cplusplus
298#if __cplusplus
299}
300#endif
301#endif
302
303#endif /* end of hmac_user.h */
#define OAL_INLINE
Definition driver_soc_common.h:47
hmac_user_state_enum
Definition hmac_user.h:164
@ HMAC_USER_STATE_BUTT
Definition hmac_user.h:168
@ HMAC_USER_STATE_ACTIVE
Definition hmac_user.h:166
@ HMAC_USER_STATE_PS
Definition hmac_user.h:165
osal_u32 hmac_user_set_bandwith_handler(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, wlan_bw_cap_enum_uint8 bw_cap)
osal_u32 hmac_user_get_tid_by_num(hmac_user_stru *hmac_user, osal_u8 tid_num, hmac_tid_stru **tid_queue)
osal_void hmac_rx_compatibility_show_stat(hmac_user_stru *hmac_user)
hmac_user_stru * mac_vap_get_hmac_user_by_addr_etc(hmac_vap_stru *hmac_vap, const osal_u8 *mac_addr)
osal_s32 hmac_user_sync(hmac_user_stru *hmac_user)
osal_u32 hmac_user_keepalive_timer(osal_void *arg)
osal_u32 hmac_user_set_asoc_req_ie(hmac_user_stru *hmac_user, osal_u8 *payload, osal_u32 len, osal_u8 reass_flag)
osal_void hmac_tid_clear_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, osal_bool lock_free_flag)
osal_void hmac_user_init_slottime(const hmac_user_stru *hmac_user)
osal_void hmac_user_set_lut_info(hal_to_dmac_device_stru *hal_device, osal_u8 lut_index, osal_u8 *mac_addr)
hmac_user_ps_state_enum
Definition hmac_user.h:156
@ HMAC_USER_PS_STATE_BUTT
Definition hmac_user.h:160
@ HMAC_USER_PS_STATE_ACTIVE
Definition hmac_user.h:157
@ HMAC_USER_PS_STATE_DOZE
Definition hmac_user.h:158
osal_void hmac_user_key_search_fail_handler(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, mac_ieee80211_frame_stru *frame_hdr)
osal_u32 hmac_user_free_asoc_req_ie(hmac_user_stru *hmac_user)
osal_u32 hmac_user_add_multi_user(hmac_vap_stru *hmac_vap, osal_u16 multi_user_idx)
psm_queue_type_enum
Definition hmac_user.h:172
@ PSM_QUEUE_TYPE_IMPORTANT
Definition hmac_user.h:174
@ PSM_QUEUE_TYPE_BUTT
Definition hmac_user.h:176
@ PSM_QUEUE_TYPE_NORMAL
Definition hmac_user.h:173
osal_u32(* hmac_user_keepalive_timer_proc_cb)(osal_void *arg)
Definition hmac_user.h:240
osal_u32 hmac_psm_tid_mpdu_num(const hmac_user_stru *hmac_user)
hmac_user_stru * mac_res_get_hmac_user_etc(osal_u16 idx)
osal_void hmac_user_pause(hmac_user_stru *hmac_user)
osal_u32 hmac_update_user_last_active_time(hmac_vap_stru *hmac_vap, osal_u8 len, osal_u8 *param)
osal_u32 hmac_user_add_etc(hmac_vap_stru *hmac_vap, osal_u8 *mac_addr, osal_u16 *pus_user_index)
osal_void hmac_user_del_lut_info(osal_u8 lut_index)
osal_u32 hmac_alg_distance_notify_hook(hal_to_dmac_device_stru *hal_device, osal_u8 distance)
OAL_STATIC OAL_INLINE oal_bool_enum_uint8 hmac_user_xht_support(const hmac_user_stru *hmac_user)
Definition hmac_user.h:115
osal_u32 mac_user_init_etc(hmac_user_stru *hmac_user, osal_u16 user_idx, osal_u8 *mac_addr, hmac_vap_stru *hmac_vap)
osal_void hmac_user_use_cnt_inc(osal_u16 user_idx, hmac_user_stru **user)
osal_u8 hmac_user_state_enum_uint8
Definition hmac_user.h:170
osal_u32 hmac_user_add_notify_alg_etc(hmac_vap_stru *hmac_vap, osal_u16 user_idx)
osal_void hmac_user_use_cnt_dec(hmac_user_stru *hmac_user)
osal_void hmac_ap_resume_all_user(hmac_vap_stru *hmac_vap)
osal_u32 hmac_user_add_multi_user_etc(hmac_vap_stru *hmac_vap, osal_u16 *pus_user_index)
osal_void hmac_user_ps_queue_overrun_notify(const hmac_vap_stru *hmac_vap)
oal_bool_enum_uint8 hmac_user_get_ps_mode(const hmac_user_stru *hmac_user)
osal_u32 hmac_user_set_avail_num_space_stream_etc(hmac_user_stru *hmac_user, wlan_nss_enum_uint8 vap_nss)
osal_u8 hmac_user_ps_state_enum_uint8
Definition hmac_user.h:162
oal_bool_enum_uint8 hmac_psm_is_tid_empty(const hmac_user_stru *hmac_user)
oal_bool_enum_uint8 hmac_psm_is_psm_empty(hmac_user_stru *hmac_user)
osal_u32 hmac_user_del_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user)
osal_void hmac_rx_compatibility_identify(hmac_user_stru *hmac_user, osal_u32 rate_kbps)
osal_s32 hmac_user_add_notify_alg(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, frw_msg *msg)
osal_void hmac_ap_pause_all_user(const hmac_vap_stru *hmac_vap)
osal_void hmac_user_del(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, mac_ap_type_enum_uint8 ap_type)
OAL_STATIC OAL_INLINE oal_bool_enum_uint8 hmac_user_ht_support(const hmac_user_stru *hmac_user)
Definition hmac_user.h:100
osal_u8 psm_queue_type_enum_uint8
Definition hmac_user.h:178
osal_u32 hmac_user_resume(hmac_user_stru *hmac_user)
osal_u32 hmac_user_del_multi_user_etc(hmac_vap_stru *hmac_vap)
osal_s32 hmac_config_set_user_app_ie_cb(hmac_vap_stru *hmac_vap, frw_msg *msg)
#define WLAN_MAC_ADDR_LEN
Definition mac_addr.c:28
osal_u8 mac_ap_type_enum_uint8
Definition msg_user_manage_rom.h:42
osal_u8 oal_bool_enum_uint8
Definition oal_types_device_rom.h:45
@ OAL_FALSE
Definition oal_types_device_rom.h:41
@ OAL_TRUE
Definition oal_types_device_rom.h:42
#define INLINE__
Definition osal_list.h:25
int osal_s32
Definition osal_types.h:19
unsigned char osal_u8
Definition osal_types.h:11
osal_u8 osal_bool
Definition osal_types.h:27
#define OSAL_FALSE
Definition osal_types.h:56
void osal_void
Definition osal_types.h:29
#define OSAL_TRUE
Definition osal_types.h:57
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
#define OAL_STATIC
Definition soc_wifi_service_api.c:30
Definition frw_msg_rom.h:74
Definition hmac_user.h:80
osal_u32 assoc_req_ie_len
Definition hmac_user.h:81
osal_u8 * assoc_req_ie_buff
Definition hmac_user.h:82
Definition hmac_user.h:72
osal_u16 trans_id
Definition hmac_user.h:76
oal_bool_enum_uint8 is_protected
Definition hmac_user.h:75
hmac_user_stru * hmac_user
Definition hmac_user.h:74
hmac_vap_stru * hmac_vap
Definition hmac_user.h:73
Definition hmac_user.h:68
hmac_user_stru * hmac_user
Definition hmac_user.h:70
hmac_vap_stru * hmac_vap
Definition hmac_user.h:69
Definition hmac_user.h:220
osal_u16 tx_rate_stat_count
Definition hmac_user.h:223
osal_u32 rx_rate
Definition hmac_user.h:222
osal_u32 tx_rate
Definition hmac_user.h:221
osal_u16 rx_rate_stat_count
Definition hmac_user.h:224
Definition hmac_user.h:212
osal_s32 tx_rssi
Definition hmac_user.h:213
osal_u16 rx_rssi_stat_count
Definition hmac_user.h:216
osal_u16 tx_rssi_stat_count
Definition hmac_user.h:215
osal_s32 rx_rssi
Definition hmac_user.h:214
Definition mac_user_ext.h:463
Definition hmac_user.h:197
osal_u32 psm_enqueue_succ_cnt
Definition hmac_user.h:198
osal_u32 psm_dequeue_fail_cnt
Definition hmac_user.h:200
osal_u32 psm_rsp_pspoll_fail_cnt
Definition hmac_user.h:207
osal_u32 psm_rsp_pspoll_succ_cnt
Definition hmac_user.h:206
osal_u32 psm_resv_pspoll_send_null
Definition hmac_user.h:205
osal_u32 psm_send_null_fail_cnt
Definition hmac_user.h:204
osal_u32 psm_send_data_fail_cnt
Definition hmac_user.h:202
osal_u32 psm_dequeue_succ_cnt
Definition hmac_user.h:201
osal_u32 psm_send_mgmt_fail_cnt
Definition hmac_user.h:203
osal_u32 psm_enqueue_fail_cnt
Definition hmac_user.h:199
Definition hmac_user.h:227
oal_bool_enum_uint8 hmac_rssi_stat_flag
Definition hmac_user.h:233
hmac_rssi_stat_info_stru dmac_rssi_stat_info
Definition hmac_user.h:236
oal_bool_enum_uint8 hmac_rate_stat_flag
Definition hmac_user.h:234
wlan_protocol_enum_uint8 protocol
Definition hmac_user.h:229
hal_channel_assemble_enum_uint8 en_bandwidth
Definition hmac_user.h:230
hmac_rate_stat_info_stru dmac_rate_stat_info
Definition hmac_user.h:237
Definition mac_user_ext.h:519
mac_user_ht_hdl_stru ht_hdl
Definition mac_user_ext.h:565
osal_u8 cur_protocol_mode
Definition mac_user_ext.h:538
mac_vht_hdl_stru vht_hdl
Definition mac_user_ext.h:566
Definition hmac_user.h:183
osal_u32 uapsd_send_qosnull
Definition hmac_user.h:190
osal_u32 uapsd_send_qosnull_fail
Definition hmac_user.h:194
osal_u32 uapsd_tx_dequeue_count
Definition hmac_user.h:185
osal_u32 uapsd_process_queue_error
Definition hmac_user.h:192
osal_u32 uapsd_rx_trigger_state_trans
Definition hmac_user.h:188
osal_u32 uapsd_rx_trigger_in_sp
Definition hmac_user.h:187
osal_u32 uapsd_send_extra_qosnull
Definition hmac_user.h:191
osal_u32 uapsd_rx_trigger_dup_seq
Definition hmac_user.h:189
osal_u32 uapsd_tx_enqueue_count
Definition hmac_user.h:184
osal_u32 uapsd_flush_queue_error
Definition hmac_user.h:193
osal_u32 uapsd_tx_enqueue_free_count
Definition hmac_user.h:186
Definition mac_vap_ext.h:2019
Definition mac_frame_common_rom.h:575
oal_bool_enum_uint8 ht_capable
Definition mac_user_common_rom.h:142
oal_bool_enum_uint8 vht_capable
Definition mac_user_common_rom.h:106
Definition hal_ops_common_rom.h:529
osal_u8 hal_channel_assemble_enum_uint8
Definition wlan_custom_type.h:34
@ WLAN_PROTOCOL_BUTT
Definition wlan_types.h:486
@ WLAN_HT_MODE
Definition wlan_types.h:479
osal_u8 wlan_bw_cap_enum_uint8
Definition wlan_types.h:455
td_u8 wlan_protocol_enum_uint8
Definition wlan_types.h:488
osal_u8 wlan_nss_enum_uint8
Definition wlan_types_base_rom.h:240