Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Prakash Dhavali | 55d4577 | 2014-02-12 13:19:04 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012 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. |
Kiet Lam | 26cd647 | 2014-02-11 23:30:06 -0800 | [diff] [blame] | 20 | */ |
Prakash Dhavali | 55d4577 | 2014-02-12 13:19:04 -0800 | [diff] [blame] | 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 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 28 | /*=========================================================================== |
| 29 | * |
| 30 | * @file: wlan_status_code.h |
| 31 | * |
| 32 | * @brief: Common header file containing all the status codes |
| 33 | * All status codes have been consolidated into one enum |
| 34 | * |
| 35 | * @author: Kumar Anand |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 36 | * |
| 37 | *=========================================================================*/ |
| 38 | |
| 39 | #ifndef __WLAN_STATUS_CODE_H__ |
| 40 | #define __WLAN_STATUS_CODE_H__ |
| 41 | |
| 42 | /*------------------------------------------------------------------------- |
| 43 | Include Files |
| 44 | -------------------------------------------------------------------------*/ |
| 45 | |
| 46 | /*---------------------------------------------------------------------------- |
| 47 | * Preprocessor Definitions and Constants |
| 48 | * -------------------------------------------------------------------------*/ |
| 49 | |
| 50 | /* This is to force compiler to use the maximum of an int ( 4 bytes ) */ |
| 51 | #define WLAN_STATUS_MAX_ENUM_SIZE 0x7FFFFFFF |
| 52 | |
| 53 | /*---------------------------------------------------------------------------- |
| 54 | * Type Declarations |
| 55 | * -------------------------------------------------------------------------*/ |
| 56 | |
| 57 | typedef enum |
| 58 | { |
| 59 | /* PAL Request succeeded!*/ |
| 60 | PAL_STATUS_SUCCESS = 0, |
| 61 | |
| 62 | /* HAL Request succeeded!*/ |
| 63 | eHAL_STATUS_SUCCESS = 0, |
| 64 | |
| 65 | /* Request failed because there of an invalid request. This is |
| 66 | typically the result of invalid parameters on the request*/ |
| 67 | PAL_STATUS_INVAL, |
| 68 | |
| 69 | /* Request refused because a request is already in place and |
| 70 | another cannot be handled currently */ |
| 71 | PAL_STATUS_ALREADY, |
| 72 | |
| 73 | /* Request failed because of an empty condition */ |
| 74 | PAL_STATUS_EMPTY, |
| 75 | |
| 76 | /* Request failed for some unknown reason. */ |
| 77 | PAL_STATUS_FAILURE, |
| 78 | |
| 79 | /* HAL general failure */ |
| 80 | eHAL_STATUS_FAILURE, |
| 81 | |
| 82 | /* Invalid Param*/ |
| 83 | eHAL_STATUS_INVALID_PARAMETER, |
| 84 | |
| 85 | /* Invalid Station Index*/ |
| 86 | eHAL_STATUS_INVALID_STAIDX, |
| 87 | |
| 88 | /* DPU descriptor table full*/ |
| 89 | eHAL_STATUS_DPU_DESCRIPTOR_TABLE_FULL, |
| 90 | |
| 91 | /* No interrupts */ |
| 92 | eHAL_STATUS_NO_INTERRUPTS, |
| 93 | |
| 94 | /* Interrupt present */ |
| 95 | eHAL_STATUS_INTERRUPT_PRESENT, |
| 96 | |
| 97 | /* Stable Table is full */ |
| 98 | eHAL_STATUS_STA_TABLE_FULL, |
| 99 | |
| 100 | /* Duplicate Station found */ |
| 101 | eHAL_STATUS_DUPLICATE_STA, |
| 102 | |
| 103 | /* BSSID is invalid */ |
| 104 | eHAL_STATUS_BSSID_INVALID, |
| 105 | |
| 106 | /* STA is invalid */ |
| 107 | eHAL_STATUS_STA_INVALID, |
| 108 | |
| 109 | /* BSSID is is duplicate */ |
| 110 | eHAL_STATUS_DUPLICATE_BSSID, |
| 111 | |
| 112 | /* BSS Idx is invalid */ |
| 113 | eHAL_STATUS_INVALID_BSSIDX, |
| 114 | |
| 115 | /* BSSID Table is full */ |
| 116 | eHAL_STATUS_BSSID_TABLE_FULL, |
| 117 | |
| 118 | /* Invalid DPU signature*/ |
| 119 | eHAL_STATUS_INVALID_SIGNATURE, |
| 120 | |
| 121 | /* Invalid key Id */ |
| 122 | eHAL_STATUS_INVALID_KEYID, |
| 123 | |
| 124 | /* Already on requested channel */ |
| 125 | eHAL_STATUS_SET_CHAN_ALREADY_ON_REQUESTED_CHAN, |
| 126 | |
| 127 | /* UMA descriptor table is full */ |
| 128 | eHAL_STATUS_UMA_DESCRIPTOR_TABLE_FULL, |
| 129 | |
| 130 | /* MIC Key table is full */ |
| 131 | eHAL_STATUS_DPU_MICKEY_TABLE_FULL, |
| 132 | |
| 133 | /* A-MPDU/BA related Error codes */ |
| 134 | eHAL_STATUS_BA_RX_BUFFERS_FULL, |
| 135 | eHAL_STATUS_BA_RX_MAX_SESSIONS_REACHED, |
| 136 | eHAL_STATUS_BA_RX_INVALID_SESSION_ID, |
| 137 | |
| 138 | eHAL_STATUS_TIMER_START_FAILED, |
| 139 | eHAL_STATUS_TIMER_STOP_FAILED, |
| 140 | eHAL_STATUS_FAILED_ALLOC, |
| 141 | |
| 142 | /* Scan failure codes */ |
| 143 | eHAL_STATUS_NOTIFY_BSS_FAIL, |
| 144 | |
| 145 | /* Self STA not deleted as reference count is not zero */ |
| 146 | eHAL_STATUS_DEL_STA_SELF_IGNORED_REF_COUNT_NOT_ZERO, |
| 147 | |
| 148 | /* Self STA not added as entry already exists*/ |
| 149 | eHAL_STATUS_ADD_STA_SELF_IGNORED_REF_COUNT_NOT_ZERO, |
| 150 | |
| 151 | /* Message from SLM has failure status */ |
| 152 | eHAL_STATUS_FW_SEND_MSG_FAILED, |
| 153 | |
| 154 | /* BSS disconnect status : beacon miss */ |
| 155 | eHAL_STATUS_BSS_DISCONN_BEACON_MISS, |
| 156 | /* BSS disconnect status : deauth */ |
| 157 | eHAL_STATUS_BSS_DISCONN_DEAUTH, |
| 158 | /* BSS disconnect status : disassoc */ |
| 159 | eHAL_STATUS_BSS_DISCONN_DISASSOC, |
| 160 | |
Shailender Karmuchi | 3e7202f | 2013-06-25 01:14:09 -0700 | [diff] [blame] | 161 | /* Data abort happened in PHY sw */ |
| 162 | eHAL_STATUS_PHY_DATA_ABORT, |
| 163 | |
| 164 | /* Invalid NV field */ |
| 165 | eHAL_STATUS_PHY_INVALID_NV_FIELD, |
| 166 | |
| 167 | /* WLAN boot test failed */ |
| 168 | eHAL_STATUS_WLAN_BOOT_TEST_FAILURE, |
| 169 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 170 | /* Max status value */ |
| 171 | eHAL_STATUS_MAX_VALUE = WLAN_STATUS_MAX_ENUM_SIZE |
| 172 | |
| 173 | } palStatus, eHalStatus; |
| 174 | |
| 175 | /* Helper Macros */ |
| 176 | #define PAL_IS_STATUS_SUCCESS(status) (PAL_STATUS_SUCCESS == (status)) |
| 177 | #define HAL_STATUS_SUCCESS( status ) (eHAL_STATUS_SUCCESS == (status)) |
| 178 | |
| 179 | #endif //__WLAN_STATUS_CODE_H__ |