rx_msdu_ext_desc_info.h 7.6 KB

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