rx_msdu_desc_info.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. /*
  2. * Copyright (c) 2020 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. //
  19. // DO NOT EDIT! This file is automatically generated
  20. // These definitions are tied to a particular hardware layout
  21. #ifndef _RX_MSDU_DESC_INFO_H_
  22. #define _RX_MSDU_DESC_INFO_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. // ################ START SUMMARY #################
  26. //
  27. // Dword Fields
  28. // 0 first_msdu_in_mpdu_flag[0], last_msdu_in_mpdu_flag[1], msdu_continuation[2], msdu_length[16:3], reo_destination_indication[21:17], msdu_drop[22], sa_is_valid[23], sa_idx_timeout[24], da_is_valid[25], da_is_mcbc[26], da_idx_timeout[27], reserved_0a[31:28]
  29. // 1 reserved_1a[31:0]
  30. //
  31. // ################ END SUMMARY #################
  32. #define NUM_OF_DWORDS_RX_MSDU_DESC_INFO 2
  33. struct rx_msdu_desc_info {
  34. uint32_t first_msdu_in_mpdu_flag : 1, //[0]
  35. last_msdu_in_mpdu_flag : 1, //[1]
  36. msdu_continuation : 1, //[2]
  37. msdu_length : 14, //[16:3]
  38. reo_destination_indication : 5, //[21:17]
  39. msdu_drop : 1, //[22]
  40. sa_is_valid : 1, //[23]
  41. sa_idx_timeout : 1, //[24]
  42. da_is_valid : 1, //[25]
  43. da_is_mcbc : 1, //[26]
  44. da_idx_timeout : 1, //[27]
  45. reserved_0a : 4; //[31:28]
  46. uint32_t reserved_1a : 32; //[31:0]
  47. };
  48. /*
  49. first_msdu_in_mpdu_flag
  50. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  51. over multiple buffers, this field will be valid in the Last
  52. buffer used by the MSDU
  53. <enum 0 Not_first_msdu> This is not the first MSDU in
  54. the MPDU.
  55. <enum 1 first_msdu> This MSDU is the first one in the
  56. MPDU.
  57. <legal all>
  58. last_msdu_in_mpdu_flag
  59. Consumer: WBM/REO/SW/FW
  60. Producer: RXDMA
  61. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  62. over multiple buffers, this field will be valid in the Last
  63. buffer used by the MSDU
  64. <enum 0 Not_last_msdu> There are more MSDUs linked to
  65. this MSDU that belongs to this MPDU
  66. <enum 1 Last_msdu> this MSDU is the last one in the
  67. MPDU. This setting is only allowed in combination with
  68. 'Msdu_continuation' set to 0. This implies that when an msdu
  69. is spread out over multiple buffers and thus
  70. msdu_continuation is set, only for the very last buffer of
  71. the msdu, can the 'last_msdu_in_mpdu_flag' be set.
  72. When both first_msdu_in_mpdu_flag and
  73. last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
  74. belongs to only contains a single MSDU.
  75. <legal all>
  76. msdu_continuation
  77. When set, this MSDU buffer was not able to hold the
  78. entire MSDU. The next buffer will therefor contain
  79. additional information related to this MSDU.
  80. <legal all>
  81. msdu_length
  82. Parsed from RX_MSDU_START TLV . In the case MSDU spans
  83. over multiple buffers, this field will be valid in the First
  84. buffer used by MSDU.
  85. Full MSDU length in bytes after decapsulation.
  86. This field is still valid for MPDU frames without
  87. A-MSDU. It still represents MSDU length after decapsulation
  88. Or in case of RAW MPDUs, it indicates the length of the
  89. entire MPDU (without FCS field)
  90. <legal all>
  91. reo_destination_indication
  92. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  93. over multiple buffers, this field will be valid in the Last
  94. buffer used by the MSDU
  95. The ID of the REO exit ring where the MSDU frame shall
  96. push after (MPDU level) reordering has finished.
  97. <enum 0 reo_destination_tcl> Reo will push the frame
  98. into the REO2TCL ring
  99. <enum 1 reo_destination_sw1> Reo will push the frame
  100. into the REO2SW1 ring
  101. <enum 2 reo_destination_sw2> Reo will push the frame
  102. into the REO2SW2 ring
  103. <enum 3 reo_destination_sw3> Reo will push the frame
  104. into the REO2SW3 ring
  105. <enum 4 reo_destination_sw4> Reo will push the frame
  106. into the REO2SW4 ring
  107. <enum 5 reo_destination_release> Reo will push the frame
  108. into the REO_release ring
  109. <enum 6 reo_destination_fw> Reo will push the frame into
  110. the REO2FW ring
  111. <enum 7 reo_destination_sw5> Reo will push the frame
  112. into the REO2SW5 ring (REO remaps this in chips without
  113. REO2SW5 ring, e.g. Pine)
  114. <enum 8 reo_destination_sw6> Reo will push the frame
  115. into the REO2SW6 ring (REO remaps this in chips without
  116. REO2SW6 ring, e.g. Pine)
  117. <enum 9 reo_destination_9> REO remaps this <enum 10
  118. reo_destination_10> REO remaps this
  119. <enum 11 reo_destination_11> REO remaps this
  120. <enum 12 reo_destination_12> REO remaps this <enum 13
  121. reo_destination_13> REO remaps this
  122. <enum 14 reo_destination_14> REO remaps this
  123. <enum 15 reo_destination_15> REO remaps this
  124. <enum 16 reo_destination_16> REO remaps this
  125. <enum 17 reo_destination_17> REO remaps this
  126. <enum 18 reo_destination_18> REO remaps this
  127. <enum 19 reo_destination_19> REO remaps this
  128. <enum 20 reo_destination_20> REO remaps this
  129. <enum 21 reo_destination_21> REO remaps this
  130. <enum 22 reo_destination_22> REO remaps this
  131. <enum 23 reo_destination_23> REO remaps this
  132. <enum 24 reo_destination_24> REO remaps this
  133. <enum 25 reo_destination_25> REO remaps this
  134. <enum 26 reo_destination_26> REO remaps this
  135. <enum 27 reo_destination_27> REO remaps this
  136. <enum 28 reo_destination_28> REO remaps this
  137. <enum 29 reo_destination_29> REO remaps this
  138. <enum 30 reo_destination_30> REO remaps this
  139. <enum 31 reo_destination_31> REO remaps this
  140. <legal all>
  141. msdu_drop
  142. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  143. over multiple buffers, this field will be valid in the Last
  144. buffer used by the MSDU
  145. When set, REO shall drop this MSDU and not forward it to
  146. any other ring...
  147. <legal all>
  148. sa_is_valid
  149. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  150. over multiple buffers, this field will be valid in the Last
  151. buffer used by the MSDU
  152. Indicates that OLE found a valid SA entry for this MSDU
  153. <legal all>
  154. sa_idx_timeout
  155. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  156. over multiple buffers, this field will be valid in the Last
  157. buffer used by the MSDU
  158. Indicates an unsuccessful MAC source address search due
  159. to the expiring of the search timer for this MSDU
  160. <legal all>
  161. da_is_valid
  162. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  163. over multiple buffers, this field will be valid in the Last
  164. buffer used by the MSDU
  165. Indicates that OLE found a valid DA entry for this MSDU
  166. <legal all>
  167. da_is_mcbc
  168. Field Only valid if da_is_valid is set
  169. Indicates the DA address was a Multicast of Broadcast
  170. address for this MSDU
  171. <legal all>
  172. da_idx_timeout
  173. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  174. over multiple buffers, this field will be valid in the Last
  175. buffer used by the MSDU
  176. Indicates an unsuccessful MAC destination address search
  177. due to the expiring of the search timer for this MSDU
  178. <legal all>
  179. reserved_0a
  180. <legal 0>
  181. reserved_1a
  182. <legal 0>
  183. */
  184. /* Description RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG
  185. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  186. over multiple buffers, this field will be valid in the Last
  187. buffer used by the MSDU
  188. <enum 0 Not_first_msdu> This is not the first MSDU in
  189. the MPDU.
  190. <enum 1 first_msdu> This MSDU is the first one in the
  191. MPDU.
  192. <legal all>
  193. */
  194. #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000000
  195. #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_LSB 0
  196. #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_MASK 0x00000001
  197. /* Description RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG
  198. Consumer: WBM/REO/SW/FW
  199. Producer: RXDMA
  200. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  201. over multiple buffers, this field will be valid in the Last
  202. buffer used by the MSDU
  203. <enum 0 Not_last_msdu> There are more MSDUs linked to
  204. this MSDU that belongs to this MPDU
  205. <enum 1 Last_msdu> this MSDU is the last one in the
  206. MPDU. This setting is only allowed in combination with
  207. 'Msdu_continuation' set to 0. This implies that when an msdu
  208. is spread out over multiple buffers and thus
  209. msdu_continuation is set, only for the very last buffer of
  210. the msdu, can the 'last_msdu_in_mpdu_flag' be set.
  211. When both first_msdu_in_mpdu_flag and
  212. last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
  213. belongs to only contains a single MSDU.
  214. <legal all>
  215. */
  216. #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000000
  217. #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_LSB 1
  218. #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_MASK 0x00000002
  219. /* Description RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION
  220. When set, this MSDU buffer was not able to hold the
  221. entire MSDU. The next buffer will therefor contain
  222. additional information related to this MSDU.
  223. <legal all>
  224. */
  225. #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_OFFSET 0x00000000
  226. #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_LSB 2
  227. #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_MASK 0x00000004
  228. /* Description RX_MSDU_DESC_INFO_0_MSDU_LENGTH
  229. Parsed from RX_MSDU_START TLV . In the case MSDU spans
  230. over multiple buffers, this field will be valid in the First
  231. buffer used by MSDU.
  232. Full MSDU length in bytes after decapsulation.
  233. This field is still valid for MPDU frames without
  234. A-MSDU. It still represents MSDU length after decapsulation
  235. Or in case of RAW MPDUs, it indicates the length of the
  236. entire MPDU (without FCS field)
  237. <legal all>
  238. */
  239. #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_OFFSET 0x00000000
  240. #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_LSB 3
  241. #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_MASK 0x0001fff8
  242. /* Description RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION
  243. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  244. over multiple buffers, this field will be valid in the Last
  245. buffer used by the MSDU
  246. The ID of the REO exit ring where the MSDU frame shall
  247. push after (MPDU level) reordering has finished.
  248. <enum 0 reo_destination_tcl> Reo will push the frame
  249. into the REO2TCL ring
  250. <enum 1 reo_destination_sw1> Reo will push the frame
  251. into the REO2SW1 ring
  252. <enum 2 reo_destination_sw2> Reo will push the frame
  253. into the REO2SW2 ring
  254. <enum 3 reo_destination_sw3> Reo will push the frame
  255. into the REO2SW3 ring
  256. <enum 4 reo_destination_sw4> Reo will push the frame
  257. into the REO2SW4 ring
  258. <enum 5 reo_destination_release> Reo will push the frame
  259. into the REO_release ring
  260. <enum 6 reo_destination_fw> Reo will push the frame into
  261. the REO2FW ring
  262. <enum 7 reo_destination_sw5> Reo will push the frame
  263. into the REO2SW5 ring (REO remaps this in chips without
  264. REO2SW5 ring, e.g. Pine)
  265. <enum 8 reo_destination_sw6> Reo will push the frame
  266. into the REO2SW6 ring (REO remaps this in chips without
  267. REO2SW6 ring, e.g. Pine)
  268. <enum 9 reo_destination_9> REO remaps this <enum 10
  269. reo_destination_10> REO remaps this
  270. <enum 11 reo_destination_11> REO remaps this
  271. <enum 12 reo_destination_12> REO remaps this <enum 13
  272. reo_destination_13> REO remaps this
  273. <enum 14 reo_destination_14> REO remaps this
  274. <enum 15 reo_destination_15> REO remaps this
  275. <enum 16 reo_destination_16> REO remaps this
  276. <enum 17 reo_destination_17> REO remaps this
  277. <enum 18 reo_destination_18> REO remaps this
  278. <enum 19 reo_destination_19> REO remaps this
  279. <enum 20 reo_destination_20> REO remaps this
  280. <enum 21 reo_destination_21> REO remaps this
  281. <enum 22 reo_destination_22> REO remaps this
  282. <enum 23 reo_destination_23> REO remaps this
  283. <enum 24 reo_destination_24> REO remaps this
  284. <enum 25 reo_destination_25> REO remaps this
  285. <enum 26 reo_destination_26> REO remaps this
  286. <enum 27 reo_destination_27> REO remaps this
  287. <enum 28 reo_destination_28> REO remaps this
  288. <enum 29 reo_destination_29> REO remaps this
  289. <enum 30 reo_destination_30> REO remaps this
  290. <enum 31 reo_destination_31> REO remaps this
  291. <legal all>
  292. */
  293. #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_OFFSET 0x00000000
  294. #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_LSB 17
  295. #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_MASK 0x003e0000
  296. /* Description RX_MSDU_DESC_INFO_0_MSDU_DROP
  297. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  298. over multiple buffers, this field will be valid in the Last
  299. buffer used by the MSDU
  300. When set, REO shall drop this MSDU and not forward it to
  301. any other ring...
  302. <legal all>
  303. */
  304. #define RX_MSDU_DESC_INFO_0_MSDU_DROP_OFFSET 0x00000000
  305. #define RX_MSDU_DESC_INFO_0_MSDU_DROP_LSB 22
  306. #define RX_MSDU_DESC_INFO_0_MSDU_DROP_MASK 0x00400000
  307. /* Description RX_MSDU_DESC_INFO_0_SA_IS_VALID
  308. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  309. over multiple buffers, this field will be valid in the Last
  310. buffer used by the MSDU
  311. Indicates that OLE found a valid SA entry for this MSDU
  312. <legal all>
  313. */
  314. #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000
  315. #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_LSB 23
  316. #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_MASK 0x00800000
  317. /* Description RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT
  318. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  319. over multiple buffers, this field will be valid in the Last
  320. buffer used by the MSDU
  321. Indicates an unsuccessful MAC source address search due
  322. to the expiring of the search timer for this MSDU
  323. <legal all>
  324. */
  325. #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000
  326. #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 24
  327. #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x01000000
  328. /* Description RX_MSDU_DESC_INFO_0_DA_IS_VALID
  329. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  330. over multiple buffers, this field will be valid in the Last
  331. buffer used by the MSDU
  332. Indicates that OLE found a valid DA entry for this MSDU
  333. <legal all>
  334. */
  335. #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000
  336. #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_LSB 25
  337. #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_MASK 0x02000000
  338. /* Description RX_MSDU_DESC_INFO_0_DA_IS_MCBC
  339. Field Only valid if da_is_valid is set
  340. Indicates the DA address was a Multicast of Broadcast
  341. address for this MSDU
  342. <legal all>
  343. */
  344. #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000
  345. #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_LSB 26
  346. #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x04000000
  347. /* Description RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT
  348. Parsed from RX_MSDU_END TLV . In the case MSDU spans
  349. over multiple buffers, this field will be valid in the Last
  350. buffer used by the MSDU
  351. Indicates an unsuccessful MAC destination address search
  352. due to the expiring of the search timer for this MSDU
  353. <legal all>
  354. */
  355. #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000
  356. #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 27
  357. #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x08000000
  358. /* Description RX_MSDU_DESC_INFO_0_RESERVED_0A
  359. <legal 0>
  360. */
  361. #define RX_MSDU_DESC_INFO_0_RESERVED_0A_OFFSET 0x00000000
  362. #define RX_MSDU_DESC_INFO_0_RESERVED_0A_LSB 28
  363. #define RX_MSDU_DESC_INFO_0_RESERVED_0A_MASK 0xf0000000
  364. /* Description RX_MSDU_DESC_INFO_1_RESERVED_1A
  365. <legal 0>
  366. */
  367. #define RX_MSDU_DESC_INFO_1_RESERVED_1A_OFFSET 0x00000004
  368. #define RX_MSDU_DESC_INFO_1_RESERVED_1A_LSB 0
  369. #define RX_MSDU_DESC_INFO_1_RESERVED_1A_MASK 0xffffffff
  370. #endif // _RX_MSDU_DESC_INFO_H_