blob: d1ee6cb6ab0b7c06a1f5d7a71bda0c7f00286b79 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2012, 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 __ATHDEFS_H__
29#define __ATHDEFS_H__
30
31/*
32 * This file contains definitions that may be used across both
33 * Host and Target software. Nothing here is module-dependent
34 * or platform-dependent.
35 */
36
37/*
38 * Generic error codes that can be used by hw, sta, ap, sim, dk
39 * and any other environments. Since these are enums, feel free to
40 * add any more codes that you need.
41 */
42
43typedef enum {
44 A_ERROR = -1, /* Generic error return */
45 A_OK = 0, /* success */
46 /* Following values start at 1 */
47 A_DEVICE_NOT_FOUND, /* not able to find PCI device */
48 A_NO_MEMORY, /* not able to allocate memory, not available */
49 A_MEMORY_NOT_AVAIL, /* memory region is not free for mapping */
50 A_NO_FREE_DESC, /* no free descriptors available */
51 A_BAD_ADDRESS, /* address does not match descriptor */
52 A_WIN_DRIVER_ERROR, /* used in NT_HW version, if problem at init */
53 A_REGS_NOT_MAPPED, /* registers not correctly mapped */
54 A_EPERM, /* Not superuser */
55 A_EACCES, /* Access denied */
56 A_ENOENT, /* No such entry, search failed, etc. */
57 A_EEXIST, /* The object already exists (can't create) */
58 A_EFAULT, /* Bad address fault */
59 A_EBUSY, /* Object is busy */
60 A_EINVAL, /* Invalid parameter */
61 A_EMSGSIZE, /* Inappropriate message buffer length */
62 A_ECANCELED, /* Operation canceled */
63 A_ENOTSUP, /* Operation not supported */
64 A_ECOMM, /* Communication error on send */
65 A_EPROTO, /* Protocol error */
66 A_ENODEV, /* No such device */
67 A_EDEVNOTUP, /* device is not UP */
68 A_NO_RESOURCE, /* No resources for requested operation */
69 A_HARDWARE, /* Hardware failure */
70 A_PENDING, /* Asynchronous routine; will send up results la
71 ter (typically in callback) */
72 A_EBADCHANNEL, /* The channel cannot be used */
73 A_DECRYPT_ERROR, /* Decryption error */
74 A_PHY_ERROR, /* RX PHY error */
75 A_CONSUMED, /* Object was consumed */
76 A_CLONE, /* The buffer is cloned */
77 A_USB_ERROR, /* Rome USB Target error */
78} A_STATUS;
79
80#define A_SUCCESS(x) (x == A_OK)
81#define A_FAILED(x) (!A_SUCCESS(x))
82
83#endif /* __ATHDEFS_H__ */