rx_msdu_ext_desc_info.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef _RX_MSDU_EXT_DESC_INFO_H_
  17. #define _RX_MSDU_EXT_DESC_INFO_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_RX_MSDU_EXT_DESC_INFO 1
  21. struct rx_msdu_ext_desc_info {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t reo_destination_indication : 5, // [4:0]
  24. service_code : 9, // [13:5]
  25. priority_valid : 1, // [14:14]
  26. data_offset : 12, // [26:15]
  27. src_link_id : 3, // [29:27]
  28. reserved_0a : 2; // [31:30]
  29. #else
  30. uint32_t reserved_0a : 2, // [31:30]
  31. src_link_id : 3, // [29:27]
  32. data_offset : 12, // [26:15]
  33. priority_valid : 1, // [14:14]
  34. service_code : 9, // [13:5]
  35. reo_destination_indication : 5; // [4:0]
  36. #endif
  37. };
  38. /* Description REO_DESTINATION_INDICATION
  39. Parsed from RX_MSDU_END TLV . In the case MSDU spans over
  40. multiple buffers, this field will be valid in the Last
  41. buffer used by the MSDU
  42. The ID of the REO exit ring where the MSDU frame shall push
  43. after (MPDU level) reordering has finished.
  44. <enum 0 reo_destination_sw0> Reo will push the frame into
  45. the REO2SW0 ring
  46. <enum 1 reo_destination_sw1> Reo will push the frame into
  47. the REO2SW1 ring
  48. <enum 2 reo_destination_sw2> Reo will push the frame into
  49. the REO2SW2 ring
  50. <enum 3 reo_destination_sw3> Reo will push the frame into
  51. the REO2SW3 ring
  52. <enum 4 reo_destination_sw4> Reo will push the frame into
  53. the REO2SW4 ring
  54. <enum 5 reo_destination_release> Reo will push the frame
  55. into the REO_release ring
  56. <enum 6 reo_destination_fw> Reo will push the frame into
  57. the REO2FW ring
  58. <enum 7 reo_destination_sw5> Reo will push the frame into
  59. the REO2SW5 ring (REO remaps this in chips without REO2SW5
  60. ring)
  61. <enum 8 reo_destination_sw6> Reo will push the frame into
  62. the REO2SW6 ring (REO remaps this in chips without REO2SW6
  63. ring)
  64. <enum 9 reo_destination_sw7> Reo will push the frame into
  65. the REO2SW7 ring (REO remaps this in chips without REO2SW7
  66. ring)
  67. <enum 10 reo_destination_sw8> Reo will push the frame into
  68. the REO2SW8 ring (REO remaps this in chips without REO2SW8
  69. ring)
  70. <enum 11 reo_destination_11> REO remaps this
  71. <enum 12 reo_destination_12> REO remaps this <enum 13 reo_destination_13>
  72. REO remaps this
  73. <enum 14 reo_destination_14> REO remaps this
  74. <enum 15 reo_destination_15> REO remaps this
  75. <enum 16 reo_destination_16> REO remaps this
  76. <enum 17 reo_destination_17> REO remaps this
  77. <enum 18 reo_destination_18> REO remaps this
  78. <enum 19 reo_destination_19> REO remaps this
  79. <enum 20 reo_destination_20> REO remaps this
  80. <enum 21 reo_destination_21> REO remaps this
  81. <enum 22 reo_destination_22> REO remaps this
  82. <enum 23 reo_destination_23> REO remaps this
  83. <enum 24 reo_destination_24> REO remaps this
  84. <enum 25 reo_destination_25> REO remaps this
  85. <enum 26 reo_destination_26> REO remaps this
  86. <enum 27 reo_destination_27> REO remaps this
  87. <enum 28 reo_destination_28> REO remaps this
  88. <enum 29 reo_destination_29> REO remaps this
  89. <enum 30 reo_destination_30> REO remaps this
  90. <enum 31 reo_destination_31> REO remaps this
  91. <legal all>
  92. */
  93. #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_OFFSET 0x00000000
  94. #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_LSB 0
  95. #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_MSB 4
  96. #define RX_MSDU_EXT_DESC_INFO_REO_DESTINATION_INDICATION_MASK 0x0000001f
  97. /* Description SERVICE_CODE
  98. Opaque service code between PPE and Wi-Fi
  99. This field gets passed on by REO to PPE in the EDMA descriptor
  100. ('REO_TO_PPE_RING').
  101. <legal all>
  102. */
  103. #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_OFFSET 0x00000000
  104. #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_LSB 5
  105. #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_MSB 13
  106. #define RX_MSDU_EXT_DESC_INFO_SERVICE_CODE_MASK 0x00003fe0
  107. /* Description PRIORITY_VALID
  108. This field gets passed on by REO to PPE in the EDMA descriptor
  109. ('REO_TO_PPE_RING').
  110. <legal all>
  111. */
  112. #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_OFFSET 0x00000000
  113. #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_LSB 14
  114. #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_MSB 14
  115. #define RX_MSDU_EXT_DESC_INFO_PRIORITY_VALID_MASK 0x00004000
  116. /* Description DATA_OFFSET
  117. The offset to Rx packet data within the buffer (including
  118. Rx DMA offset programming and L3 header padding inserted
  119. by Rx OLE).
  120. This field gets passed on by REO to PPE in the EDMA descriptor
  121. ('REO_TO_PPE_RING').
  122. <legal all>
  123. */
  124. #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_OFFSET 0x00000000
  125. #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_LSB 15
  126. #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_MSB 26
  127. #define RX_MSDU_EXT_DESC_INFO_DATA_OFFSET_MASK 0x07ff8000
  128. /* Description SRC_LINK_ID
  129. Consumer: SW
  130. Producer: RXDMA
  131. Set to the link ID of the PMAC that received the frame
  132. <legal all>
  133. */
  134. #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_OFFSET 0x00000000
  135. #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_LSB 27
  136. #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_MSB 29
  137. #define RX_MSDU_EXT_DESC_INFO_SRC_LINK_ID_MASK 0x38000000
  138. /* Description RESERVED_0A
  139. <legal 0>
  140. */
  141. #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_OFFSET 0x00000000
  142. #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_LSB 30
  143. #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_MSB 31
  144. #define RX_MSDU_EXT_DESC_INFO_RESERVED_0A_MASK 0xc0000000
  145. #endif // RX_MSDU_EXT_DESC_INFO