xref: /wlan-driver/qcacld-3.0/core/sme/inc/sme_power_save.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2015-2019, 2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name #if !defined(__SME_POWER_SAVE_H)
21*5113495bSYour Name #define __SME_POWER_SAVE_H
22*5113495bSYour Name #include "qdf_lock.h"
23*5113495bSYour Name #include "qdf_trace.h"
24*5113495bSYour Name #include "qdf_mem.h"
25*5113495bSYour Name #include "qdf_types.h"
26*5113495bSYour Name #include "ani_system_defs.h"
27*5113495bSYour Name #include "sir_api.h"
28*5113495bSYour Name 
29*5113495bSYour Name /*
30*5113495bSYour Name  * Auto Ps Entry User default timeout value, used instead of negative timeouts
31*5113495bSYour Name  * from user space - 5000ms
32*5113495bSYour Name  */
33*5113495bSYour Name #define AUTO_PS_ENTRY_USER_TIMER_DEFAULT_VALUE 5000
34*5113495bSYour Name #define AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE 1000
35*5113495bSYour Name #define AUTO_PS_DEFER_TIMEOUT_MS 1500
36*5113495bSYour Name 
37*5113495bSYour Name #ifdef QCA_WIFI_EMULATION
38*5113495bSYour Name /*
39*5113495bSYour Name  * Auto Ps timeout for emulation targets.
40*5113495bSYour Name  */
41*5113495bSYour Name #define AUTO_PS_EMULATION_TIMEOUT 11
42*5113495bSYour Name #endif
43*5113495bSYour Name 
44*5113495bSYour Name /**
45*5113495bSYour Name  * struct ps_global_info - global struct for Power save information
46*5113495bSYour Name  * @ps_params: maintain power save state and USAPD params
47*5113495bSYour Name  * @remain_in_power_active_till_dhcp: remain in Power active till DHCP completes
48*5113495bSYour Name  */
49*5113495bSYour Name struct ps_global_info {
50*5113495bSYour Name 	struct ps_params ps_params[WLAN_MAX_VDEVS];
51*5113495bSYour Name };
52*5113495bSYour Name 
53*5113495bSYour Name /**
54*5113495bSYour Name  * enum sme_ps_cmd: power save message to send WMA
55*5113495bSYour Name  * @SME_PS_ENABLE: For power save enable.
56*5113495bSYour Name  * @SME_PS_DISABLE: for Power save disable.
57*5113495bSYour Name  * @SME_PS_UAPSD_ENABLE; for UAPSD enable.
58*5113495bSYour Name  * @SME_PS_UAPSD_DISABLE: for UAPSD disable.
59*5113495bSYour Name  * @SME_PS_WOWL_ENTER: for WOWL Enter.
60*5113495bSYour Name  * @SME_PS_WOWL_EXIT: for WOWL Exit.
61*5113495bSYour Name  * @SME_PS_WOWL_ADD_BCAST_PTRN: Add bcst WOWL pattern.
62*5113495bSYour Name  * @SME_PS_WOWL_DEL_BCAST_PTRN: Del Bcsr Wowl Pattern.
63*5113495bSYour Name  */
64*5113495bSYour Name enum sme_ps_cmd {
65*5113495bSYour Name 	SME_PS_ENABLE = 0,
66*5113495bSYour Name 	SME_PS_DISABLE,
67*5113495bSYour Name 	SME_PS_UAPSD_ENABLE,
68*5113495bSYour Name 	SME_PS_UAPSD_DISABLE,
69*5113495bSYour Name 	SME_PS_WOWL_ENTER,
70*5113495bSYour Name 	SME_PS_WOWL_EXIT,
71*5113495bSYour Name 	SME_PS_WOWL_ADD_BCAST_PTRN,
72*5113495bSYour Name 	SME_PS_WOWL_DEL_BCAST_PTRN,
73*5113495bSYour Name };
74*5113495bSYour Name 
75*5113495bSYour Name #endif
76