rx_msdu_details.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. /*
  2. * Copyright (c) 2021 The Linux Foundation. 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. // $ATH_LICENSE_HW_HDR_C$
  17. //
  18. // DO NOT EDIT! This file is automatically generated
  19. // These definitions are tied to a particular hardware layout
  20. #ifndef _RX_MSDU_DETAILS_H_
  21. #define _RX_MSDU_DETAILS_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. #include "buffer_addr_info.h"
  25. #include "rx_msdu_desc_info.h"
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0-1 struct buffer_addr_info buffer_addr_info_details;
  30. // 2-3 struct rx_msdu_desc_info rx_msdu_desc_info_details;
  31. //
  32. // ################ END SUMMARY #################
  33. #define NUM_OF_DWORDS_RX_MSDU_DETAILS 4
  34. struct rx_msdu_details {
  35. struct buffer_addr_info buffer_addr_info_details;
  36. struct rx_msdu_desc_info rx_msdu_desc_info_details;
  37. };
  38. /*
  39. struct buffer_addr_info buffer_addr_info_details
  40. Consumer: REO/SW
  41. Producer: RXDMA
  42. Details of the physical address of the buffer containing
  43. an MSDU (or entire MPDU)
  44. struct rx_msdu_desc_info rx_msdu_desc_info_details
  45. Consumer: REO/SW
  46. Producer: RXDMA
  47. General information related to the MSDU that should be
  48. passed on from RXDMA all the way to to the REO destination
  49. ring.
  50. */
  51. /* EXTERNAL REFERENCE : struct buffer_addr_info buffer_addr_info_details */
  52. /* Description RX_MSDU_DETAILS_0_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_31_0
  53. Address (lower 32 bits) of the MSDU buffer OR
  54. MSDU_EXTENSION descriptor OR Link Descriptor
  55. In case of 'NULL' pointer, this field is set to 0
  56. <legal all>
  57. */
  58. #define RX_MSDU_DETAILS_0_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_31_0_OFFSET 0x00000000
  59. #define RX_MSDU_DETAILS_0_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_31_0_LSB 0
  60. #define RX_MSDU_DETAILS_0_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_31_0_MASK 0xffffffff
  61. /* Description RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_39_32
  62. Address (upper 8 bits) of the MSDU buffer OR
  63. MSDU_EXTENSION descriptor OR Link Descriptor
  64. In case of 'NULL' pointer, this field is set to 0
  65. <legal all>
  66. */
  67. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_39_32_OFFSET 0x00000004
  68. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_39_32_LSB 0
  69. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_BUFFER_ADDR_39_32_MASK 0x000000ff
  70. /* Description RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_RETURN_BUFFER_MANAGER
  71. Consumer: WBM
  72. Producer: SW/FW
  73. In case of 'NULL' pointer, this field is set to 0
  74. Indicates to which buffer manager the buffer OR
  75. MSDU_EXTENSION descriptor OR link descriptor that is being
  76. pointed to shall be returned after the frame has been
  77. processed. It is used by WBM for routing purposes.
  78. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  79. to the WMB buffer idle list
  80. <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
  81. returned to the WMB idle link descriptor idle list
  82. <enum 2 FW_BM> This buffer shall be returned to the FW
  83. <enum 3 SW0_BM> This buffer shall be returned to the SW,
  84. ring 0
  85. <enum 4 SW1_BM> This buffer shall be returned to the SW,
  86. ring 1
  87. <enum 5 SW2_BM> This buffer shall be returned to the SW,
  88. ring 2
  89. <enum 6 SW3_BM> This buffer shall be returned to the SW,
  90. ring 3
  91. <enum 7 SW4_BM> This buffer shall be returned to the SW,
  92. ring 3
  93. <legal all>
  94. */
  95. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
  96. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_RETURN_BUFFER_MANAGER_LSB 8
  97. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_RETURN_BUFFER_MANAGER_MASK 0x00000700
  98. /* Description RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_SW_BUFFER_COOKIE
  99. Cookie field exclusively used by SW.
  100. In case of 'NULL' pointer, this field is set to 0
  101. HW ignores the contents, accept that it passes the
  102. programmed value on to other descriptors together with the
  103. physical address
  104. Field can be used by SW to for example associate the
  105. buffers physical address with the virtual address
  106. The bit definitions as used by SW are within SW HLD
  107. specification
  108. NOTE:
  109. The three most significant bits can have a special
  110. meaning in case this struct is embedded in a TX_MPDU_DETAILS
  111. STRUCT, and field transmit_bw_restriction is set
  112. In case of NON punctured transmission:
  113. Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
  114. Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
  115. Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
  116. Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
  117. In case of punctured transmission:
  118. Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only
  119. Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only
  120. Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only
  121. Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only
  122. Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only
  123. Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only
  124. Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only
  125. Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only
  126. Note: a punctured transmission is indicated by the
  127. presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler
  128. TLV
  129. <legal all>
  130. */
  131. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_SW_BUFFER_COOKIE_OFFSET 0x00000004
  132. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_SW_BUFFER_COOKIE_LSB 11
  133. #define RX_MSDU_DETAILS_1_BUFFER_ADDR_INFO_DETAILS_SW_BUFFER_COOKIE_MASK 0xfffff800
  134. /* EXTERNAL REFERENCE : struct rx_msdu_desc_info rx_msdu_desc_info_details */
  135. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG
  136. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  137. over multiple buffers, this field will be valid in the Last
  138. buffer used by the MSDU
  139. <enum 0 Not_first_msdu> This is not the first MSDU in
  140. the MPDU.
  141. <enum 1 first_msdu> This MSDU is the first one in the
  142. MPDU.
  143. <legal all>
  144. */
  145. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000008
  146. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_LSB 0
  147. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_MASK 0x00000001
  148. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG
  149. Consumer: WBM/REO/SW/FW
  150. Producer: RXDMA
  151. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  152. over multiple buffers, this field will be valid in the Last
  153. buffer used by the MSDU
  154. <enum 0 Not_last_msdu> There are more MSDUs linked to
  155. this MSDU that belongs to this MPDU
  156. <enum 1 Last_msdu> this MSDU is the last one in the
  157. MPDU. This setting is only allowed in combination with
  158. 'Msdu_continuation' set to 0. This implies that when an msdu
  159. is spread out over multiple buffers and thus
  160. msdu_continuation is set, only for the very last buffer of
  161. the msdu, can the 'last_msdu_in_mpdu_flag' be set.
  162. When both first_msdu_in_mpdu_flag and
  163. last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
  164. belongs to only contains a single MSDU.
  165. <legal all>
  166. */
  167. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000008
  168. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_LSB 1
  169. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_MASK 0x00000002
  170. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION
  171. When set, this MSDU buffer was not able to hold the
  172. entire MSDU. The next buffer will therefor contain
  173. additional information related to this MSDU.
  174. <legal all>
  175. */
  176. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_OFFSET 0x00000008
  177. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_LSB 2
  178. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_MASK 0x00000004
  179. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH
  180. Parsed from RX_MSDU_START TLV . In the case MSDU spans
  181. over multiple buffers, this field will be valid in the First
  182. buffer used by MSDU.
  183. Full MSDU length in bytes after decapsulation.
  184. This field is still valid for MPDU frames without
  185. A-MSDU. It still represents MSDU length after decapsulation
  186. Or in case of RAW MPDUs, it indicates the length of the
  187. entire MPDU (without FCS field)
  188. <legal all>
  189. */
  190. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_OFFSET 0x00000008
  191. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_LSB 3
  192. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_MASK 0x0001fff8
  193. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_REO_DESTINATION_INDICATION
  194. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  195. over multiple buffers, this field will be valid in the Last
  196. buffer used by the MSDU
  197. The ID of the REO exit ring where the MSDU frame shall
  198. push after (MPDU level) reordering has finished.
  199. <enum 0 reo_destination_tcl> Reo will push the frame
  200. into the REO2TCL ring
  201. <enum 1 reo_destination_sw1> Reo will push the frame
  202. into the REO2SW1 ring
  203. <enum 2 reo_destination_sw2> Reo will push the frame
  204. into the REO2SW1 ring
  205. <enum 3 reo_destination_sw3> Reo will push the frame
  206. into the REO2SW1 ring
  207. <enum 4 reo_destination_sw4> Reo will push the frame
  208. into the REO2SW1 ring
  209. <enum 5 reo_destination_release> Reo will push the frame
  210. into the REO_release ring
  211. <enum 6 reo_destination_fw> Reo will push the frame into
  212. the REO2FW ring
  213. <enum 7 reo_destination_7> REO remaps this
  214. <enum 8 reo_destination_8> REO remaps this <enum 9
  215. reo_destination_9> REO remaps this <enum 10
  216. reo_destination_10> REO remaps this
  217. <enum 11 reo_destination_11> REO remaps this
  218. <enum 12 reo_destination_12> REO remaps this <enum 13
  219. reo_destination_13> REO remaps this
  220. <enum 14 reo_destination_14> REO remaps this
  221. <enum 15 reo_destination_15> REO remaps this
  222. <enum 16 reo_destination_16> REO remaps this
  223. <enum 17 reo_destination_17> REO remaps this
  224. <enum 18 reo_destination_18> REO remaps this
  225. <enum 19 reo_destination_19> REO remaps this
  226. <enum 20 reo_destination_20> REO remaps this
  227. <enum 21 reo_destination_21> REO remaps this
  228. <enum 22 reo_destination_22> REO remaps this
  229. <enum 23 reo_destination_23> REO remaps this
  230. <enum 24 reo_destination_24> REO remaps this
  231. <enum 25 reo_destination_25> REO remaps this
  232. <enum 26 reo_destination_26> REO remaps this
  233. <enum 27 reo_destination_27> REO remaps this
  234. <enum 28 reo_destination_28> REO remaps this
  235. <enum 29 reo_destination_29> REO remaps this
  236. <enum 30 reo_destination_30> REO remaps this
  237. <enum 31 reo_destination_31> REO remaps this
  238. <legal all>
  239. */
  240. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_REO_DESTINATION_INDICATION_OFFSET 0x00000008
  241. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_REO_DESTINATION_INDICATION_LSB 17
  242. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_REO_DESTINATION_INDICATION_MASK 0x003e0000
  243. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP
  244. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  245. over multiple buffers, this field will be valid in the Last
  246. buffer used by the MSDU
  247. When set, REO shall drop this MSDU and not forward it to
  248. any other ring...
  249. <legal all>
  250. */
  251. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_OFFSET 0x00000008
  252. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_LSB 22
  253. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_MASK 0x00400000
  254. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID
  255. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  256. over multiple buffers, this field will be valid in the Last
  257. buffer used by the MSDU
  258. Indicates that OLE found a valid SA entry for this MSDU
  259. <legal all>
  260. */
  261. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_OFFSET 0x00000008
  262. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_LSB 23
  263. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_MASK 0x00800000
  264. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT
  265. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  266. over multiple buffers, this field will be valid in the Last
  267. buffer used by the MSDU
  268. Indicates an unsuccessful MAC source address search due
  269. to the expiring of the search timer for this MSDU
  270. <legal all>
  271. */
  272. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT_OFFSET 0x00000008
  273. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT_LSB 24
  274. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT_MASK 0x01000000
  275. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID
  276. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  277. over multiple buffers, this field will be valid in the Last
  278. buffer used by the MSDU
  279. Indicates that OLE found a valid DA entry for this MSDU
  280. <legal all>
  281. */
  282. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_OFFSET 0x00000008
  283. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_LSB 25
  284. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_MASK 0x02000000
  285. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC
  286. Field Only valid if da_is_valid is set
  287. Indicates the DA address was a Multicast of Broadcast
  288. address for this MSDU
  289. <legal all>
  290. */
  291. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_OFFSET 0x00000008
  292. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_LSB 26
  293. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_MASK 0x04000000
  294. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT
  295. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  296. over multiple buffers, this field will be valid in the Last
  297. buffer used by the MSDU
  298. Indicates an unsuccessful MAC destination address search
  299. due to the expiring of the search timer for this MSDU
  300. <legal all>
  301. */
  302. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT_OFFSET 0x00000008
  303. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT_LSB 27
  304. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT_MASK 0x08000000
  305. /* Description RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A
  306. <legal 0>
  307. */
  308. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A_OFFSET 0x00000008
  309. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A_LSB 28
  310. #define RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A_MASK 0xf0000000
  311. /* Description RX_MSDU_DETAILS_3_RX_MSDU_DESC_INFO_DETAILS_RESERVED_1A
  312. <legal 0>
  313. */
  314. #define RX_MSDU_DETAILS_3_RX_MSDU_DESC_INFO_DETAILS_RESERVED_1A_OFFSET 0x0000000c
  315. #define RX_MSDU_DETAILS_3_RX_MSDU_DESC_INFO_DETAILS_RESERVED_1A_LSB 0
  316. #define RX_MSDU_DETAILS_3_RX_MSDU_DESC_INFO_DETAILS_RESERVED_1A_MASK 0xffffffff
  317. #endif // _RX_MSDU_DETAILS_H_