OLD | NEW |
(Empty) | |
| 1 //------------------------------------------------------------------------------ |
| 2 // <copyright file="athdefs.h" company="Atheros"> |
| 3 // Copyright (c) 2004-2007 Atheros Corporation. All rights reserved. |
| 4 // |
| 5 // This program is free software; you can redistribute it and/or modify |
| 6 // it under the terms of the GNU General Public License version 2 as |
| 7 // published by the Free Software Foundation; |
| 8 // |
| 9 // Software distributed under the License is distributed on an "AS |
| 10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 11 // implied. See the License for the specific language governing |
| 12 // rights and limitations under the License. |
| 13 // |
| 14 // |
| 15 //------------------------------------------------------------------------------ |
| 16 //============================================================================== |
| 17 // Author(s): ="Atheros" |
| 18 //============================================================================== |
| 19 #ifndef __ATHDEFS_H__ |
| 20 #define __ATHDEFS_H__ |
| 21 |
| 22 /* |
| 23 * This file contains definitions that may be used across both |
| 24 * Host and Target software. Nothing here is module-dependent |
| 25 * or platform-dependent. |
| 26 */ |
| 27 |
| 28 /* |
| 29 * Generic error codes that can be used by hw, sta, ap, sim, dk |
| 30 * and any other environments. Since these are enums, feel free to |
| 31 * add any more codes that you need. |
| 32 */ |
| 33 |
| 34 typedef enum { |
| 35 A_ERROR = -1, /* Generic error return */ |
| 36 A_OK = 0, /* success */ |
| 37 /* Following values start at 1 */ |
| 38 A_DEVICE_NOT_FOUND, /* not able to find PCI device */ |
| 39 A_NO_MEMORY, /* not able to allocate memory, not available */ |
| 40 A_MEMORY_NOT_AVAIL, /* memory region is not free for mapping */ |
| 41 A_NO_FREE_DESC, /* no free descriptors available */ |
| 42 A_BAD_ADDRESS, /* address does not match descriptor */ |
| 43 A_WIN_DRIVER_ERROR, /* used in NT_HW version, if problem at init */ |
| 44 A_REGS_NOT_MAPPED, /* registers not correctly mapped */ |
| 45 A_EPERM, /* Not superuser */ |
| 46 A_EACCES, /* Access denied */ |
| 47 A_ENOENT, /* No such entry, search failed, etc. */ |
| 48 A_EEXIST, /* The object already exists (can't create) */ |
| 49 A_EFAULT, /* Bad address fault */ |
| 50 A_EBUSY, /* Object is busy */ |
| 51 A_EINVAL, /* Invalid parameter */ |
| 52 A_EMSGSIZE, /* Inappropriate message buffer length */ |
| 53 A_ECANCELED, /* Operation canceled */ |
| 54 A_ENOTSUP, /* Operation not supported */ |
| 55 A_ECOMM, /* Communication error on send */ |
| 56 A_EPROTO, /* Protocol error */ |
| 57 A_ENODEV, /* No such device */ |
| 58 A_EDEVNOTUP, /* device is not UP */ |
| 59 A_NO_RESOURCE, /* No resources for requested operation */ |
| 60 A_HARDWARE, /* Hardware failure */ |
| 61 A_PENDING, /* Asynchronous routine; will send up results la |
| 62 ter (typically in callback) */ |
| 63 A_EBADCHANNEL, /* The channel cannot be used */ |
| 64 A_DECRYPT_ERROR, /* Decryption error */ |
| 65 A_PHY_ERROR, /* RX PHY error */ |
| 66 A_CONSUMED /* Object was consumed */ |
| 67 } A_STATUS; |
| 68 |
| 69 #define A_SUCCESS(x) (x == A_OK) |
| 70 #define A_FAILED(x) (!A_SUCCESS(x)) |
| 71 |
| 72 #ifndef TRUE |
| 73 #define TRUE 1 |
| 74 #endif |
| 75 |
| 76 #ifndef FALSE |
| 77 #define FALSE 0 |
| 78 #endif |
| 79 |
| 80 #endif /* __ATHDEFS_H__ */ |
OLD | NEW |