htt_common.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * Copyright (c) 2012-2016 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. /**
  27. * @file htt_common.h
  28. *
  29. * @details the public header file of HTT layer shared between host and firmware
  30. */
  31. #ifndef _HTT_COMMON_H_
  32. #define _HTT_COMMON_H_
  33. enum htt_sec_type {
  34. htt_sec_type_none,
  35. htt_sec_type_wep128,
  36. htt_sec_type_wep104,
  37. htt_sec_type_wep40,
  38. htt_sec_type_tkip,
  39. htt_sec_type_tkip_nomic,
  40. htt_sec_type_aes_ccmp,
  41. htt_sec_type_wapi,
  42. htt_sec_type_aes_ccmp_256,
  43. htt_sec_type_aes_gcmp,
  44. htt_sec_type_aes_gcmp_256,
  45. /* keep this last! */
  46. htt_num_sec_types
  47. };
  48. enum htt_rx_ind_mpdu_status {
  49. HTT_RX_IND_MPDU_STATUS_UNKNOWN = 0x0,
  50. HTT_RX_IND_MPDU_STATUS_OK,
  51. HTT_RX_IND_MPDU_STATUS_ERR_FCS,
  52. HTT_RX_IND_MPDU_STATUS_ERR_DUP,
  53. HTT_RX_IND_MPDU_STATUS_ERR_REPLAY,
  54. HTT_RX_IND_MPDU_STATUS_ERR_INV_PEER,
  55. HTT_RX_IND_MPDU_STATUS_UNAUTH_PEER, /* only accept EAPOL frames */
  56. HTT_RX_IND_MPDU_STATUS_OUT_OF_SYNC,
  57. HTT_RX_IND_MPDU_STATUS_MGMT_CTRL, /* Non-data in promiscous mode */
  58. HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR,
  59. HTT_RX_IND_MPDU_STATUS_DECRYPT_ERR,
  60. HTT_RX_IND_MPDU_STATUS_MPDU_LENGTH_ERR,
  61. HTT_RX_IND_MPDU_STATUS_ENCRYPT_REQUIRED_ERR,
  62. HTT_RX_IND_MPDU_STATUS_PRIVACY_ERR,
  63. /*
  64. * MISC: discard for unspecified reasons.
  65. * Leave this enum value last.
  66. */
  67. HTT_RX_IND_MPDU_STATUS_ERR_MISC = 0xFF
  68. };
  69. #define HTT_INVALID_PEER 0xffff
  70. #define HTT_INVALID_VDEV 0xff
  71. #define HTT_NON_QOS_TID 16
  72. #define HTT_INVALID_TID 31
  73. #define HTT_TX_EXT_TID_DEFAULT 0
  74. #define HTT_TX_EXT_TID_NON_QOS_MCAST_BCAST HTT_NON_QOS_TID
  75. #define HTT_TX_EXT_TID_MGMT 17
  76. #define HTT_TX_EXT_TID_INVALID HTT_INVALID_TID
  77. #define HTT_TX_EXT_TID_NONPAUSE 19
  78. #define HTT_TX_L3_CKSUM_OFFLOAD 1
  79. #define HTT_TX_L4_CKSUM_OFFLOAD 2
  80. /**
  81. * @brief General specification of the tx frame contents
  82. *
  83. * @details
  84. * For efficiency, the HTT packet type values correspond
  85. * to the bit positions of the WAL packet type values, so the
  86. * translation is a simple shift operation.
  87. * The exception is the "mgmt" type, which specifies frame payload
  88. * type rather than L2 header type.
  89. */
  90. enum htt_pkt_type {
  91. htt_pkt_type_raw = 0,
  92. htt_pkt_type_native_wifi = 1,
  93. htt_pkt_type_ethernet = 2,
  94. htt_pkt_type_mgmt = 3,
  95. htt_pkt_type_eth2 = 4,
  96. /* keep this last */
  97. htt_pkt_num_types
  98. };
  99. /*
  100. * TX MSDU ID partition -
  101. * FW supports bigger MSDU ID partition which is defined as
  102. * HTT_TX_IPA_NEW_MSDU_ID_SPACE_BEGIN
  103. * When both host and FW support new partition, FW uses
  104. * HTT_TX_IPA_NEW_MSDU_ID_SPACE_BEGIN
  105. * If host doesn't support, FW falls back to HTT_TX_IPA_MSDU_ID_SPACE_BEGIN
  106. * Handshaking is done through WMI_READY and WMI_INIT
  107. */
  108. #define HTT_TX_HOST_MSDU_ID_SPACE_BEGIN 0
  109. #define HTT_TX_IPA_MSDU_ID_SPACE_BEGIN 3000
  110. #define TGT_RX2TX_MSDU_ID_SPACE_BEGIN 6000
  111. /* 8192 = 0xr2000 */
  112. #define HTT_TX_IPA_NEW_MSDU_ID_SPACE_BEGIN 8192
  113. /* 12288 = 0x3000 */
  114. #define TGT_RX2TX_NEW_MSDU_ID_SPACE_BEGIN 12288
  115. #endif /* _HTT_COMMON_H_ */