WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_power_save_rom.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2022. All rights reserved.
3 * Description: Header file of HAL power save public interfaces .
4 */
5
6#ifndef HAL_POWER_SAVE_H
7#define HAL_POWER_SAVE_H
8
10
11/*****************************************************************************
12 * 1 其他头文件包含
13 *****************************************************************************/
14/*****************************************************************************
15 * STA ps feature
16 *****************************************************************************/
17/*****************************************************************************
18 * 功能描述 : 设置MAC_P2P_NOA_CTRL寄存器中TWT的唤醒参数
19 *****************************************************************************/
20static INLINE__ osal_void hal_vap_set_twt(const hal_to_dmac_vap_stru *hal_vap, const twt_reg_param_stru *twt_param,
21 osal_u8 count, osal_u8 trigger)
22{
23 hal_public_hook_func(_vap_set_twt)(hal_vap, twt_param, count, trigger);
24}
25
26/*****************************************************************************
27 * 功能描述 : 设置MAC_P2P_NOA_CTRL寄存器中TWT的校准参数
28 *****************************************************************************/
29static INLINE__ osal_void hal_cali_twt(const hal_to_dmac_vap_stru *hal_vap)
30{
31 hal_public_hook_func(_cali_twt)(hal_vap);
32}
33
34#ifdef _PRE_WLAN_FEATURE_MAC_PARSE_TIM
35/*****************************************************************************
36 * 功能描述 : 设置bcn tim ie的偏移地址寄存器
37 *****************************************************************************/
38static INLINE__ osal_void hal_mac_set_bcn_tim_pos(const hal_to_dmac_vap_stru *hal_vap, osal_u16 pos)
39{
40 hal_public_hook_func(_mac_set_bcn_tim_pos)(hal_vap, pos);
41}
42
43/*****************************************************************************
44 * 功能描述 : 设置硬件解析beacon开关
45 *****************************************************************************/
46static INLINE__ osal_void hal_pm_set_mac_parse_tim(osal_u8 flag)
47{
48 hal_public_hook_func(_pm_set_mac_parse_tim)(flag);
49}
50
51/*****************************************************************************
52 * 功能描述 : 设置mac aid寄存器
53 *****************************************************************************/
54static INLINE__ osal_void hal_set_mac_aid(const hal_to_dmac_vap_stru *hal_vap, osal_u16 aid)
55{
56 hal_public_hook_func(_set_mac_aid)(hal_vap, aid);
57}
58#endif
59
60/*****************************************************************************
61 * 功能描述 : 设置PSM寄存器中listen_interval的值
62 *****************************************************************************/
63static INLINE__ osal_void hal_set_psm_listen_interval(const hal_to_dmac_vap_stru *hal_vap, osal_u16 interval)
64{
65 hal_public_hook_func(_set_psm_listen_interval)(hal_vap, interval);
66}
67
68/*****************************************************************************
69 * 功能描述 : 设置PSM寄存器中listen_interval_count的值
70 *****************************************************************************/
71static INLINE__ osal_void hal_set_psm_listen_interval_count(hal_to_dmac_vap_stru *hal_vap, osal_u16 interval_count)
72{
73 hal_public_hook_func(_set_psm_listen_interval_count)(hal_vap, interval_count);
74}
75
76/*****************************************************************************
77 * 功能描述 : 设置PSM寄存器中tbtt offset的值
78 *****************************************************************************/
79static INLINE__ osal_void hal_set_tbtt_offset(const hal_to_dmac_vap_stru *hal_vap, osal_u16 offset)
80{
81 hal_public_hook_func(_set_tbtt_offset)(hal_vap, offset);
82}
83
84#ifdef _PRE_WLAN_FEATURE_POWERSAVE
85/*****************************************************************************
86 * 功能描述 : 设置PSM寄存器中ext tbtt offset的值
87 *****************************************************************************/
88static INLINE__ osal_void hal_set_psm_ext_tbtt_offset(const hal_to_dmac_vap_stru *hal_vap, osal_u16 offset)
89{
90 hal_public_hook_func(_set_psm_ext_tbtt_offset)(hal_vap, offset);
91}
92#endif
93/*****************************************************************************
94 * 功能描述 : 设置beacon period寄存器
95 *****************************************************************************/
96static INLINE__ osal_void hal_vap_set_psm_beacon_period(const hal_to_dmac_vap_stru *hal_vap, osal_u32 beacon_period)
97{
98 hal_public_hook_func(_set_psm_beacon_period)(hal_vap, beacon_period);
99}
100
101/*****************************************************************************
102 * 功能描述 : 设置beacon等待的超时值
103 *****************************************************************************/
104static INLINE__ osal_void hal_set_beacon_timeout(osal_u16 value)
105{
106 hal_public_hook_func(_set_beacon_timeout)(value);
107}
108
109/*****************************************************************************
110 * 功能描述 : 设置DTIM寄存器
111 *****************************************************************************/
112static INLINE__ osal_void hal_set_sta_dtim_period(const hal_to_dmac_vap_stru *hal_vap, osal_u32 dtim_period)
113{
114 hal_public_hook_func(_set_sta_dtim_period)(hal_vap, dtim_period);
115}
116
117/*****************************************************************************
118 函 数 名 : hal_get_psm_dtim_count
119 功能描述 : 获取ditm count寄存器
120*****************************************************************************/
121static INLINE__ osal_u8 hal_get_psm_dtim_count(const hal_to_dmac_vap_stru *hal_vap)
122{
123 return hal_public_hook_func(_get_psm_dtim_count)(hal_vap);
124}
125
126/*****************************************************************************
127 函 数 名 : hal_get_psm_dtim_count
128 功能描述 : 获取ditm count寄存器
129*****************************************************************************/
130static INLINE__ osal_void hal_set_psm_dtim_count(hal_to_dmac_vap_stru *hal_vap, osal_u8 dtim_count)
131{
132 hal_public_hook_func(_set_psm_dtim_count)(hal_vap, dtim_count);
133}
134
135/*****************************************************************************
136 * AP ps feature
137 *****************************************************************************/
138/*****************************************************************************
139 * 功能描述 : 使能sta ps ctrl寄存器
140 *****************************************************************************/
141static INLINE__ osal_void hal_tx_enable_peer_sta_ps_ctrl(osal_u8 lut_index)
142{
143 hal_public_hook_func(_tx_enable_peer_sta_ps_ctrl)(lut_index);
144}
145
146/*****************************************************************************
147 * 功能描述 : 去使能sta ps ctrl寄存器
148 *****************************************************************************/
149static INLINE__ osal_void hal_tx_disable_peer_sta_ps_ctrl(osal_u8 lut_index)
150{
151 hal_public_hook_func(_tx_disable_peer_sta_ps_ctrl)(lut_index);
152}
153
154/*****************************************************************************
155 * 功能描述 : 使能resp_ps_bit_ctrl
156 *****************************************************************************/
157static INLINE__ osal_void hal_tx_enable_resp_ps_bit_ctrl(osal_u8 lut_index)
158{
159 hal_public_hook_func(_tx_enable_resp_ps_bit_ctrl)(lut_index);
160}
161
162/*****************************************************************************
163 * 功能描述 : 去使能resp_ps_bit_ctrl
164 *****************************************************************************/
165static INLINE__ osal_void hal_tx_disable_resp_ps_bit_ctrl(osal_u8 lut_index)
166{
167 hal_public_hook_func(_tx_disable_resp_ps_bit_ctrl)(lut_index);
168}
169
170/*****************************************************************************
171 * 功能描述 : 使能所有resp_ps_bit_ctrl
172 *****************************************************************************/
173static INLINE__ osal_void hal_tx_enable_resp_ps_bit_ctrl_all(osal_void)
174{
175 hal_public_hook_func(_tx_enable_resp_ps_bit_ctrl_all)();
176}
177
178/*****************************************************************************
179 * 功能描述 : 去使能所有resp_ps_bit_ctrl
180 *****************************************************************************/
181static INLINE__ osal_void hal_tx_disable_resp_ps_bit_ctrl_all(osal_void)
182{
183 hal_public_hook_func(_tx_disable_resp_ps_bit_ctrl_all)();
184}
185/*****************************************************************************
186 * 功能描述 : 去使能所有resp_ps_bit_ctrl
187 *****************************************************************************/
188static INLINE__ osal_void hal_set_tx_queue_suspend_mode(osal_u8 mask, osal_u8 mode)
189{
190 hal_public_hook_func(_set_tx_queue_suspend_mode)(mask, mode);
191}
192#endif /* end of hal_power_save.h */
193
#define hal_public_hook_func(_func)
Definition hal_ops_common_rom.h:85
#define INLINE__
Definition osal_list.h:25
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
Definition hal_common_ops_device_rom.h:870
Definition hal_common_ops_device_rom.h:1363