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