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