blob: cce93fdedc5cd9b9d6d99ec8cf84243a587eb4f3 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Prakash Dhavali2e9ffc82014-02-19 21:16:20 -08002 * Copyright (c) 2014 The Linux Foundation. All rights reserved.
Kiet Lamc9a03d22014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
Gopichand Nakkala9c070ad2013-01-08 21:16:34 -080020 */
Kiet Lamc9a03d22014-02-19 00:32:59 -080021
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028#ifndef _WLAN_PS_WOW_DIAG_H_
29#define _WLAN_PS_WOW_DIAG_H_
30
31
32#include "vos_diag_core_event.h"
33#include "vos_diag_core_log.h"
34
35#ifdef FEATURE_WLAN_DIAG_SUPPORT
36
37typedef enum
38{
39 WLAN_BMPS_ENTER_REQ =0,
40 WLAN_UAPSD_START_REQ =1,
41 WLAN_UAPSD_STOP_REQ =2,
42 WLAN_ENTER_STANDBY_REQ =3,
43 WLAN_ENTER_DEEP_SLEEP_REQ =4,
44 WLAN_START_BMPS_AUTO_TIMER_REQ =5,
45 WLAN_STOP_BMPS_AUTO_TIMER_REQ =6,
46 WLAN_IMPS_ENTER_REQ =7,
47 WLAN_ENTER_FULL_POWER_REQ =8,
48 WLAN_PMC_CURRENT_STATE =9,
49 WLAN_PS_MODE_ENABLE_REQ =10,
50 WLAN_PS_MODE_DISABLE_REQ =11,
51 WLAN_WINMOB_D_POWER_STATE =12,
52 WLAN_BMPS_DTIM_PERIOD =13,
53 WLAN_BMPS_FINAL_LI =14,
54 WLAN_BMPS_SET_CONFIG =15,
55
56} wlan_ps_evt_subtype_t;
57
58// maps directly to eRequestFullPowerReason
59typedef enum
60{
61 WLAN_MISSED_BEACON_IND_RCVD, /* PE received a MAX_MISSED_BEACON_IND */
62 WLAN_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */
63 WLAN_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */
64 WLAN_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */
65 WLAN_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */
66 WLAN_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */
67 WLAN_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */
68 WLAN_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */
69 WLAN_FULL_PWR_NEEDED_BY_QOS, /* QOS requests full power */
70 WLAN_REASON_OTHER /* No specific reason. General reason code */
71
72} wlan_ps_full_power_request_reason_t;
73
74// maps directly to ePmcState
75typedef enum
76{
77 WLAN_PMC_STOPPED, /* PMC is stopped */
78 WLAN_PMC_FULL_POWER, /* full power */
79 WLAN_PMC_LOW_POWER, /* low power */
80 WLAN_PMC_REQUEST_IMPS, /* requesting IMPS */
81 WLAN_PMC_IMPS, /* in IMPS */
82 WLAN_PMC_REQUEST_BMPS, /* requesting BMPS */
83 WLAN_PMC_BMPS, /* in BMPS */
84 WLAN_PMC_REQUEST_FULL_POWER, /* requesting full power */
85 WLAN_PMC_REQUEST_START_UAPSD, /* requesting Start UAPSD */
86 WLAN_PMC_REQUEST_STOP_UAPSD, /* requesting Stop UAPSD */
87 WLAN_PMC_UAPSD, /* in UAPSD */
88 WLAN_PMC_REQUEST_STANDBY, /* requesting standby mode */
89 WLAN_PMC_STANDBY, /* in standby mode */
90 WLAN_PMC_REQUEST_ENTER_WOWL, /* requesting enter WOWL */
91 WLAN_PMC_REQUEST_EXIT_WOWL, /* requesting exit WOWL */
92 WLAN_PMC_WOWL /* Chip in WOWL mode */
93
94} wlan_ps_pmc_current_state_t;
95
96// maps directly to ePmcPowerSavingMode
97typedef enum
98{
99 WLAN_IDLE_MODE_POWER_SAVE, /* Idle Mode Power Save (IMPS) */
100 WLAN_BEACON_MODE_POWER_SAVE, /* Beacon Mode Power Save (BMPS) */
101 WLAN_SPATIAL_MULTIPLEX_POWER_SAVE, /* Spatial Multiplexing Power Save (SMPS) */
102 WLAN_UAPSD_MODE_POWER_SAVE, /* Unscheduled Automatic Power Save Delivery Mode */
103 WLAN_STANDBY_MODE_POWER_SAVE, /* Standby Power Save Mode */
104 WLAN_WOWL_MODE_POWER_SAVE /* Wake-on-Wireless LAN Power Save Mode */
105
106} wlan_ps_enable_disable_ps_mode_t;
107
108typedef enum
109{
110 WLAN_D0,
111 WLAN_D1,
112 WLAN_D2,
113 WLAN_D3,
114 WLAN_D4
115
116} wlan_ps_winmob_d_power_state_t;
117
118typedef enum
119{
120 WLAN_WOW_ENTER_REQ =0,
121 WLAN_WOW_EXIT_REQ =1,
122 WLAN_WOW_DEL_PTRN_REQ =2,
123 WLAN_WOW_WAKEUP = 3
124
125} wlan_ps_wow_evt_subtype_t;
126
127typedef enum
128{
129 WLAN_WOW_TYPE_NONE,
130 WLAN_WOW_TYPE_MAGIC_PKT_ONLY,
131 WLAN_WOW_TYPE_PTRN_BYTE_MATCH_ONLY,
132 WLAN_WOW_TYPE_MAGIC_PKT_PTRN_BYTE_MATCH,
133
134} wlan_ps_wow_type_t;
135
136typedef enum
137{
138 WLAN_WOW_MAGIC_PKT_MATCH,
139 WLAN_WOW_PTRN_BYTE_MATCH
140
141} wlan_ps_wos_wakeup_cause_t;
142
143#endif // FEATURE_WLAN_DIAG_SUPPORT
144
145#endif // _WLAN_PS_WOW_DIAG_H_
146