2 * Copyright (c) 2013 Qualcomm Atheros, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted (subject to the limitations in the
7 * disclaimer below) provided that the following conditions are met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
17 * * Neither the name of Qualcomm Atheros nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
22 * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
23 * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 * This file contains definitions that may be used across both
40 * Host and Target software. Nothing here is module-dependent
41 * or platform-dependent.
45 * Generic error codes that can be used by hw, sta, ap, sim, dk
46 * and any other environments. Since these are enums, feel free to
47 * add any more codes that you need.
51 A_ERROR = -1, /* Generic error return */
52 A_OK = 0, /* success */
53 /* Following values start at 1 */
54 A_DEVICE_NOT_FOUND, /* not able to find PCI device */
55 A_NO_MEMORY, /* not able to allocate memory, not available */
56 A_MEMORY_NOT_AVAIL, /* memory region is not free for mapping */
57 A_NO_FREE_DESC, /* no free descriptors available */
58 A_BAD_ADDRESS, /* address does not match descriptor */
59 A_WIN_DRIVER_ERROR, /* used in NT_HW version, if problem at init */
60 A_REGS_NOT_MAPPED, /* registers not correctly mapped */
61 A_EPERM, /* Not superuser */
62 A_EACCES, /* Access denied */
63 A_ENOENT, /* No such entry, search failed, etc. */
64 A_EEXIST, /* The object already exists (can't create) */
65 A_EFAULT, /* Bad address fault */
66 A_EBUSY, /* Object is busy */
67 A_EINVAL, /* Invalid parameter */
68 A_EMSGSIZE, /* Inappropriate message buffer length */
69 A_ECANCELED, /* Operation canceled */
70 A_ENOTSUP, /* Operation not supported */
71 A_ECOMM, /* Communication error on send */
72 A_EPROTO, /* Protocol error */
73 A_ENODEV, /* No such device */
74 A_EDEVNOTUP, /* device is not UP */
75 A_NO_RESOURCE, /* No resources for requested operation */
76 A_HARDWARE, /* Hardware failure */
77 A_PENDING, /* Asynchronous routine; will send up results la
78 ter (typically in callback) */
79 A_EBADCHANNEL, /* The channel cannot be used */
80 A_DECRYPT_ERROR, /* Decryption error */
81 A_PHY_ERROR, /* RX PHY error */
82 A_CONSUMED /* Object was consumed */
85 #define A_SUCCESS(x) (x == A_OK)
86 #define A_FAILED(x) (!A_SUCCESS(x))
97 #define NULL ((void *)0)
101 * The following definition is WLAN specific definition
104 MODE_11A = 0, /* 11a Mode */
105 MODE_11G = 1, /* 11g + 11b Mode */
106 MODE_11B = 2, /* 11b Mode */
107 MODE_11GONLY = 3, /* 11g only Mode */
113 WLAN_11A_CAPABILITY = 1,
114 WLAN_11G_CAPABILITY = 2,
115 WLAN_11AG_CAPABILITY = 3,
118 #endif /* __ATHDEFS_H__ */