Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013-2014 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 | |
| 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 | |
| 28 | #ifndef _WLAN_PS_WOW_DIAG_H_ |
| 29 | #define _WLAN_PS_WOW_DIAG_H_ |
| 30 | |
| 31 | #include "host_diag_core_event.h" |
| 32 | #include "host_diag_core_log.h" |
| 33 | |
| 34 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 35 | |
| 36 | typedef enum { |
| 37 | WLAN_BMPS_ENTER_REQ = 0, |
| 38 | WLAN_UAPSD_START_REQ = 1, |
| 39 | WLAN_UAPSD_STOP_REQ = 2, |
| 40 | WLAN_ENTER_STANDBY_REQ = 3, |
| 41 | WLAN_ENTER_DEEP_SLEEP_REQ = 4, |
| 42 | WLAN_START_BMPS_AUTO_TIMER_REQ = 5, |
| 43 | WLAN_STOP_BMPS_AUTO_TIMER_REQ = 6, |
| 44 | WLAN_ENTER_FULL_POWER_REQ = 7, |
| 45 | WLAN_PMC_CURRENT_STATE = 8, |
| 46 | WLAN_PS_MODE_ENABLE_REQ = 9, |
| 47 | WLAN_PS_MODE_DISABLE_REQ = 10, |
| 48 | WLAN_WINMOB_D_POWER_STATE = 11, |
| 49 | WLAN_BMPS_DTIM_PERIOD = 12, |
| 50 | WLAN_BMPS_FINAL_LI = 13, |
| 51 | WLAN_BMPS_SET_CONFIG = 14, |
| 52 | |
| 53 | } wlan_ps_evt_subtype_t; |
| 54 | |
| 55 | /* maps directly to eRequestFullPowerReason */ |
| 56 | typedef enum { |
| 57 | /* PE received a MAX_MISSED_BEACON_IND */ |
| 58 | WLAN_MISSED_BEACON_IND_RCVD, |
| 59 | /* PE received a SIR_HAL_BMPS_STATUS_IND */ |
| 60 | WLAN_BMPS_STATUS_IND_RCVD, |
| 61 | /* BMPS mode was disabled by HDD in SME */ |
| 62 | WLAN_BMPS_MODE_DISABLED, |
| 63 | /* Link has been disconnected requested by HDD */ |
| 64 | WLAN_LINK_DISCONNECTED_BY_HDD, |
| 65 | /* Disconnect due to linklost or requested by peer */ |
| 66 | WLAN_LINK_DISCONNECTED_BY_OTHER, |
| 67 | /* HDD request full power for some reason */ |
| 68 | WLAN_FULL_PWR_NEEDED_BY_HDD, |
| 69 | /* BAP request full power for BT_AMP */ |
| 70 | WLAN_FULL_PWR_NEEDED_BY_BAP, |
| 71 | /* CSR requests full power */ |
| 72 | WLAN_FULL_PWR_NEEDED_BY_CSR, |
| 73 | /* QOS requests full power */ |
| 74 | WLAN_FULL_PWR_NEEDED_BY_QOS, |
| 75 | /* No specific reason. General reason code */ |
| 76 | WLAN_REASON_OTHER |
| 77 | } wlan_ps_full_power_request_reason_t; |
| 78 | |
| 79 | /* maps directly to ePmcState */ |
| 80 | typedef enum { |
| 81 | WLAN_PMC_STOPPED, /* PMC is stopped */ |
| 82 | WLAN_PMC_FULL_POWER, /* full power */ |
| 83 | WLAN_PMC_LOW_POWER, /* low power */ |
| 84 | WLAN_PMC_REQUEST_BMPS, /* requesting BMPS */ |
| 85 | WLAN_PMC_BMPS, /* in BMPS */ |
| 86 | WLAN_PMC_REQUEST_FULL_POWER, /* requesting full power */ |
| 87 | WLAN_PMC_REQUEST_START_UAPSD, /* requesting Start UAPSD */ |
| 88 | WLAN_PMC_REQUEST_STOP_UAPSD, /* requesting Stop UAPSD */ |
| 89 | WLAN_PMC_UAPSD, /* in UAPSD */ |
| 90 | WLAN_PMC_REQUEST_STANDBY, /* requesting standby mode */ |
| 91 | WLAN_PMC_STANDBY, /* in standby mode */ |
| 92 | WLAN_PMC_REQUEST_ENTER_WOWL, /* requesting enter WOWL */ |
| 93 | WLAN_PMC_REQUEST_EXIT_WOWL, /* requesting exit WOWL */ |
| 94 | WLAN_PMC_WOWL /* Chip in WOWL mode */ |
| 95 | } wlan_ps_pmc_current_state_t; |
| 96 | |
| 97 | /* maps directly to ePmcPowerSavingMode */ |
| 98 | typedef enum { |
| 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 */ |
| 102 | WLAN_UAPSD_MODE_POWER_SAVE, /* Unscheduled Auto PS Delivery Mode */ |
| 103 | WLAN_STANDBY_MODE_POWER_SAVE, /* Standby Power Save Mode */ |
| 104 | WLAN_WOWL_MODE_POWER_SAVE /* Wake-on-Wireless Power Save Mode */ |
| 105 | } wlan_ps_enable_disable_ps_mode_t; |
| 106 | |
| 107 | typedef enum { |
| 108 | WLAN_D0, |
| 109 | WLAN_D1, |
| 110 | WLAN_D2, |
| 111 | WLAN_D3, |
| 112 | WLAN_D4 |
| 113 | } wlan_ps_winmob_d_power_state_t; |
| 114 | |
| 115 | typedef enum { |
| 116 | WLAN_WOW_ENTER_REQ = 0, |
| 117 | WLAN_WOW_EXIT_REQ = 1, |
| 118 | WLAN_WOW_DEL_PTRN_REQ = 2, |
| 119 | WLAN_WOW_WAKEUP = 3 |
| 120 | } wlan_ps_wow_evt_subtype_t; |
| 121 | |
| 122 | typedef enum { |
| 123 | WLAN_WOW_TYPE_NONE, |
| 124 | WLAN_WOW_TYPE_MAGIC_PKT_ONLY, |
| 125 | WLAN_WOW_TYPE_PTRN_BYTE_MATCH_ONLY, |
| 126 | WLAN_WOW_TYPE_MAGIC_PKT_PTRN_BYTE_MATCH, |
| 127 | } wlan_ps_wow_type_t; |
| 128 | |
| 129 | typedef enum { |
| 130 | WLAN_WOW_MAGIC_PKT_MATCH, |
| 131 | WLAN_WOW_PTRN_BYTE_MATCH |
| 132 | } wlan_ps_wos_wakeup_cause_t; |
| 133 | |
| 134 | #endif /* FEATURE_WLAN_DIAG_SUPPORT */ |
| 135 | |
| 136 | #endif /* _WLAN_PS_WOW_DIAG_H_ */ |