rx_mpdu_desc_info.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. /*
  2. * Copyright (c) 2019, 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. #ifndef _RX_MPDU_DESC_INFO_H_
  17. #define _RX_MPDU_DESC_INFO_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. // ################ START SUMMARY #################
  21. //
  22. // Dword Fields
  23. // 0 msdu_count[7:0], mpdu_sequence_number[19:8], fragment_flag[20], mpdu_retry_bit[21], ampdu_flag[22], bar_frame[23], pn_fields_contain_valid_info[24], sa_is_valid[25], sa_idx_timeout[26], da_is_valid[27], da_is_mcbc[28], da_idx_timeout[29], raw_mpdu[30], more_fragment_flag[31]
  24. // 1 peer_meta_data[31:0]
  25. //
  26. // ################ END SUMMARY #################
  27. #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2
  28. struct rx_mpdu_desc_info {
  29. uint32_t msdu_count : 8, //[7:0]
  30. mpdu_sequence_number : 12, //[19:8]
  31. fragment_flag : 1, //[20]
  32. mpdu_retry_bit : 1, //[21]
  33. ampdu_flag : 1, //[22]
  34. bar_frame : 1, //[23]
  35. pn_fields_contain_valid_info : 1, //[24]
  36. sa_is_valid : 1, //[25]
  37. sa_idx_timeout : 1, //[26]
  38. da_is_valid : 1, //[27]
  39. da_is_mcbc : 1, //[28]
  40. da_idx_timeout : 1, //[29]
  41. raw_mpdu : 1, //[30]
  42. more_fragment_flag : 1; //[31]
  43. uint32_t peer_meta_data : 32; //[31:0]
  44. };
  45. /*
  46. msdu_count
  47. Consumer: REO/SW/FW
  48. Producer: RXDMA
  49. The number of MSDUs within the MPDU
  50. <legal all>
  51. mpdu_sequence_number
  52. Consumer: REO/SW/FW
  53. Producer: RXDMA
  54. The field can have two different meanings based on the
  55. setting of field 'BAR_frame':
  56. 'BAR_frame' is NOT set:
  57. The MPDU sequence number of the received frame.
  58. 'BAR_frame' is set.
  59. The MPDU Start sequence number from the BAR frame
  60. <legal all>
  61. fragment_flag
  62. Consumer: REO/SW/FW
  63. Producer: RXDMA
  64. When set, this MPDU is a fragment and REO should forward
  65. this fragment MPDU to the REO destination ring without any
  66. reorder checks, pn checks or bitmap update. This implies
  67. that REO is forwarding the pointer to the MSDU link
  68. descriptor. The destination ring is coming from a
  69. programmable register setting in REO
  70. <legal all>
  71. mpdu_retry_bit
  72. Consumer: REO/SW/FW
  73. Producer: RXDMA
  74. The retry bit setting from the MPDU header of the
  75. received frame
  76. <legal all>
  77. ampdu_flag
  78. Consumer: REO/SW/FW
  79. Producer: RXDMA
  80. When set, the MPDU was received as part of an A-MPDU.
  81. <legal all>
  82. bar_frame
  83. Consumer: REO/SW/FW
  84. Producer: RXDMA
  85. When set, the received frame is a BAR frame. After
  86. processing, this frame shall be pushed to SW or deleted.
  87. <legal all>
  88. pn_fields_contain_valid_info
  89. Consumer: REO/SW/FW
  90. Producer: RXDMA
  91. Copied here by RXDMA from RX_MPDU_END
  92. When not set, REO will Not perform a PN sequence number
  93. check
  94. sa_is_valid
  95. When set, OLE found a valid SA entry for all MSDUs in
  96. this MPDU
  97. <legal all>
  98. sa_idx_timeout
  99. When set, at least 1 MSDU within the MPDU has an
  100. unsuccessful MAC source address search due to the expiration
  101. of the search timer.
  102. <legal all>
  103. da_is_valid
  104. When set, OLE found a valid DA entry for all MSDUs in
  105. this MPDU
  106. <legal all>
  107. da_is_mcbc
  108. Field Only valid if da_is_valid is set
  109. When set, at least one of the DA addresses is a
  110. Multicast or Broadcast address.
  111. <legal all>
  112. da_idx_timeout
  113. When set, at least 1 MSDU within the MPDU has an
  114. unsuccessful MAC destination address search due to the
  115. expiration of the search timer.
  116. <legal all>
  117. raw_mpdu
  118. Field only valid when first_msdu_in_mpdu_flag is set.
  119. When set, the contents in the MSDU buffer contains a
  120. 'RAW' MPDU. This 'RAW' MPDU might be spread out over
  121. multiple MSDU buffers.
  122. <legal all>
  123. more_fragment_flag
  124. The More Fragment bit setting from the MPDU header of
  125. the received frame
  126. <legal all>
  127. peer_meta_data
  128. Meta data that SW has programmed in the Peer table entry
  129. of the transmitting STA.
  130. <legal all>
  131. */
  132. /* Description RX_MPDU_DESC_INFO_0_MSDU_COUNT
  133. Consumer: REO/SW/FW
  134. Producer: RXDMA
  135. The number of MSDUs within the MPDU
  136. <legal all>
  137. */
  138. #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_OFFSET 0x00000000
  139. #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_LSB 0
  140. #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_MASK 0x000000ff
  141. /* Description RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER
  142. Consumer: REO/SW/FW
  143. Producer: RXDMA
  144. The field can have two different meanings based on the
  145. setting of field 'BAR_frame':
  146. 'BAR_frame' is NOT set:
  147. The MPDU sequence number of the received frame.
  148. 'BAR_frame' is set.
  149. The MPDU Start sequence number from the BAR frame
  150. <legal all>
  151. */
  152. #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_OFFSET 0x00000000
  153. #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_LSB 8
  154. #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_MASK 0x000fff00
  155. /* Description RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG
  156. Consumer: REO/SW/FW
  157. Producer: RXDMA
  158. When set, this MPDU is a fragment and REO should forward
  159. this fragment MPDU to the REO destination ring without any
  160. reorder checks, pn checks or bitmap update. This implies
  161. that REO is forwarding the pointer to the MSDU link
  162. descriptor. The destination ring is coming from a
  163. programmable register setting in REO
  164. <legal all>
  165. */
  166. #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_OFFSET 0x00000000
  167. #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_LSB 20
  168. #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_MASK 0x00100000
  169. /* Description RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT
  170. Consumer: REO/SW/FW
  171. Producer: RXDMA
  172. The retry bit setting from the MPDU header of the
  173. received frame
  174. <legal all>
  175. */
  176. #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_OFFSET 0x00000000
  177. #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_LSB 21
  178. #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_MASK 0x00200000
  179. /* Description RX_MPDU_DESC_INFO_0_AMPDU_FLAG
  180. Consumer: REO/SW/FW
  181. Producer: RXDMA
  182. When set, the MPDU was received as part of an A-MPDU.
  183. <legal all>
  184. */
  185. #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_OFFSET 0x00000000
  186. #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_LSB 22
  187. #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_MASK 0x00400000
  188. /* Description RX_MPDU_DESC_INFO_0_BAR_FRAME
  189. Consumer: REO/SW/FW
  190. Producer: RXDMA
  191. When set, the received frame is a BAR frame. After
  192. processing, this frame shall be pushed to SW or deleted.
  193. <legal all>
  194. */
  195. #define RX_MPDU_DESC_INFO_0_BAR_FRAME_OFFSET 0x00000000
  196. #define RX_MPDU_DESC_INFO_0_BAR_FRAME_LSB 23
  197. #define RX_MPDU_DESC_INFO_0_BAR_FRAME_MASK 0x00800000
  198. /* Description RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO
  199. Consumer: REO/SW/FW
  200. Producer: RXDMA
  201. Copied here by RXDMA from RX_MPDU_END
  202. When not set, REO will Not perform a PN sequence number
  203. check
  204. */
  205. #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000000
  206. #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_LSB 24
  207. #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x01000000
  208. /* Description RX_MPDU_DESC_INFO_0_SA_IS_VALID
  209. When set, OLE found a valid SA entry for all MSDUs in
  210. this MPDU
  211. <legal all>
  212. */
  213. #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000
  214. #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_LSB 25
  215. #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_MASK 0x02000000
  216. /* Description RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT
  217. When set, at least 1 MSDU within the MPDU has an
  218. unsuccessful MAC source address search due to the expiration
  219. of the search timer.
  220. <legal all>
  221. */
  222. #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000
  223. #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 26
  224. #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x04000000
  225. /* Description RX_MPDU_DESC_INFO_0_DA_IS_VALID
  226. When set, OLE found a valid DA entry for all MSDUs in
  227. this MPDU
  228. <legal all>
  229. */
  230. #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000
  231. #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_LSB 27
  232. #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_MASK 0x08000000
  233. /* Description RX_MPDU_DESC_INFO_0_DA_IS_MCBC
  234. Field Only valid if da_is_valid is set
  235. When set, at least one of the DA addresses is a
  236. Multicast or Broadcast address.
  237. <legal all>
  238. */
  239. #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000
  240. #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_LSB 28
  241. #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x10000000
  242. /* Description RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT
  243. When set, at least 1 MSDU within the MPDU has an
  244. unsuccessful MAC destination address search due to the
  245. expiration of the search timer.
  246. <legal all>
  247. */
  248. #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000
  249. #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 29
  250. #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x20000000
  251. /* Description RX_MPDU_DESC_INFO_0_RAW_MPDU
  252. Field only valid when first_msdu_in_mpdu_flag is set.
  253. When set, the contents in the MSDU buffer contains a
  254. 'RAW' MPDU. This 'RAW' MPDU might be spread out over
  255. multiple MSDU buffers.
  256. <legal all>
  257. */
  258. #define RX_MPDU_DESC_INFO_0_RAW_MPDU_OFFSET 0x00000000
  259. #define RX_MPDU_DESC_INFO_0_RAW_MPDU_LSB 30
  260. #define RX_MPDU_DESC_INFO_0_RAW_MPDU_MASK 0x40000000
  261. /* Description RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG
  262. The More Fragment bit setting from the MPDU header of
  263. the received frame
  264. <legal all>
  265. */
  266. #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_OFFSET 0x00000000
  267. #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_LSB 31
  268. #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_MASK 0x80000000
  269. /* Description RX_MPDU_DESC_INFO_1_PEER_META_DATA
  270. Meta data that SW has programmed in the Peer table entry
  271. of the transmitting STA.
  272. <legal all>
  273. */
  274. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET 0x00000004
  275. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB 0
  276. #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK 0xffffffff
  277. #endif // _RX_MPDU_DESC_INFO_H_