blob: 00e338fa0dfa35969a53ec60cb98a154cfb0c3a8 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * 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 Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
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#if !defined( __VOS_STATUS_H )
43#define __VOS_STATUS_H
44
45/**=========================================================================
46
47 \file vos_Status.h
48
49 \brief virtual Operating System Services (vOSS) Status codes
50
51 Basic status codes/definitions used by vOSS
52
53 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
54
55 Qualcomm Confidential and Proprietary.
56
57 ========================================================================*/
58
59/* $Header$ */
60
61/*--------------------------------------------------------------------------
62 Include Files
63 ------------------------------------------------------------------------*/
64
65/*--------------------------------------------------------------------------
66 Preprocessor definitions and constants
67 ------------------------------------------------------------------------*/
68
69
70/*--------------------------------------------------------------------------
71 Type declarations
72 ------------------------------------------------------------------------*/
73
74typedef enum
75{
76 /// Request succeeded!
77 VOS_STATUS_SUCCESS,
78
79 /// Request failed because system resources (other than memory) to
80 /// fulfill request are not available.
81 VOS_STATUS_E_RESOURCES,
82
83 /// Request failed because not enough memory is available to
84 /// fulfill the request.
85 VOS_STATUS_E_NOMEM,
86
87 /// Request could not be fulfilled at this time. Try again later.
88 VOS_STATUS_E_AGAIN,
89
90 /// Request failed because there of an invalid request. This is
91 /// typically the result of invalid parameters on the request.
92 VOS_STATUS_E_INVAL,
93
94 /// Request failed because handling the request would cause a
95 /// system fault. This error is typically returned when an
96 /// invalid pointer to memory is detected.
97 VOS_STATUS_E_FAULT,
98
99 /// Request refused becayse a request is already in progress and
100 /// another cannot be handled currently.
101 VOS_STATUS_E_ALREADY,
102
103 /// Request failed because the message (type) is bad, invalid, or
104 /// not properly formatted.
105 VOS_STATUS_E_BADMSG,
106
107 /// Request failed because device or resource is busy.
108 VOS_STATUS_E_BUSY,
109
110 /// Request did not complete because it was canceled.
111 VOS_STATUS_E_CANCELED,
112
113 /// Request did not complete because it was aborted.
114 VOS_STATUS_E_ABORTED,
115
116 /// Request failed because the request is valid, though not supported
117 /// by the entity processing the request.
118 VOS_STATUS_E_NOSUPPORT,
119
120 /// Operation is not permitted.
121 VOS_STATUS_E_PERM,
122
123 /// Request failed because of an empty condition
124 VOS_STATUS_E_EMPTY,
125
126 /// Existance failure. Operation could not be completed because
127 /// something exists or does not exist.
128 VOS_STATUS_E_EXISTS,
129
130 /// Operation timed out
131 VOS_STATUS_E_TIMEOUT,
132
133 /// Request failed for some unknown reason. Note don't use this
134 /// status unless nothing else applies
135 VOS_STATUS_E_FAILURE
136
137} VOS_STATUS;
138
139/// Macro to determine if a VOS_STATUS type is success. All callers
140/// wanting to interpret VOS_STATUS should use this macro to check
141/// for success to protect against the VOS_STATUS definitions
142/// changing.
143///
144/// Use like this...
145///
146/// if ( VOS_STATUS_SUCCESS( vosStatus ) ) ...
147///
148#define VOS_IS_STATUS_SUCCESS( status ) ( VOS_STATUS_SUCCESS == ( status ) )
149
150
151
152#endif // if !defined __VOS_STATUS_H