athdefs.h 3.6 KB

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