buffer_addr_info.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*
  2. * Copyright (c) 2016-2017 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. // $ATH_LICENSE_HW_HDR_C$
  19. //
  20. // DO NOT EDIT! This file is automatically generated
  21. // These definitions are tied to a particular hardware layout
  22. #ifndef _BUFFER_ADDR_INFO_H_
  23. #define _BUFFER_ADDR_INFO_H_
  24. #if !defined(__ASSEMBLER__)
  25. #endif
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0 buffer_addr_31_0[31:0]
  30. // 1 buffer_addr_39_32[7:0], return_buffer_manager[10:8], sw_buffer_cookie[31:11]
  31. //
  32. // ################ END SUMMARY #################
  33. #define NUM_OF_DWORDS_BUFFER_ADDR_INFO 2
  34. struct buffer_addr_info {
  35. uint32_t buffer_addr_31_0 : 32; //[31:0]
  36. uint32_t buffer_addr_39_32 : 8, //[7:0]
  37. return_buffer_manager : 3, //[10:8]
  38. sw_buffer_cookie : 21; //[31:11]
  39. };
  40. /*
  41. buffer_addr_31_0
  42. Address (lower 32 bits) of the MSDU buffer OR
  43. MSDU_EXTENSION descriptor OR Link Descriptor
  44. In case of 'NULL' pointer, this field is set to 0
  45. <legal all>
  46. buffer_addr_39_32
  47. Address (upper 8 bits) of the MSDU buffer OR
  48. MSDU_EXTENSION descriptor OR Link Descriptor
  49. In case of 'NULL' pointer, this field is set to 0
  50. <legal all>
  51. return_buffer_manager
  52. Consumer: WBM
  53. Producer: SW/FW
  54. In case of 'NULL' pointer, this field is set to 0
  55. Indicates to which buffer manager the buffer OR
  56. MSDU_EXTENSION descriptor OR link descriptor that is being
  57. pointed to shall be returned after the frame has been
  58. processed. It is used by WBM for routing purposes.
  59. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  60. to the WMB buffer idle list
  61. <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
  62. returned to the WMB idle link descriptor idle list
  63. <enum 2 FW_BM> This buffer shall be returned to the FW
  64. <enum 3 SW0_BM> This buffer shall be returned to the SW,
  65. ring 0
  66. <enum 4 SW1_BM> This buffer shall be returned to the SW,
  67. ring 1
  68. <enum 5 SW2_BM> This buffer shall be returned to the SW,
  69. ring 2
  70. <enum 6 SW3_BM> This buffer shall be returned to the SW,
  71. ring 3
  72. <legal 0-6>
  73. sw_buffer_cookie
  74. Cookie field exclusively used by SW.
  75. In case of 'NULL' pointer, this field is set to 0
  76. HW ignores the contents, accept that it passes the
  77. programmed value on to other descriptors together with the
  78. physical address
  79. Field can be used by SW to for example associate the
  80. buffers physical address with the virtual address
  81. The bit definitions as used by SW are within SW HLD
  82. specification
  83. NOTE:
  84. The two most significant bits can have a special meaning
  85. in case this struct is embedded in a TX_MPDU_DETAILS STRUCT,
  86. and field transmit_bw_restriction is set
  87. Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
  88. Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
  89. Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
  90. Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
  91. <legal all>
  92. */
  93. /* Description BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0
  94. Address (lower 32 bits) of the MSDU buffer OR
  95. MSDU_EXTENSION descriptor OR Link Descriptor
  96. In case of 'NULL' pointer, this field is set to 0
  97. <legal all>
  98. */
  99. #define BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_OFFSET 0x00000000
  100. #define BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_LSB 0
  101. #define BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_MASK 0xffffffff
  102. /* Description BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32
  103. Address (upper 8 bits) of the MSDU buffer OR
  104. MSDU_EXTENSION descriptor OR Link Descriptor
  105. In case of 'NULL' pointer, this field is set to 0
  106. <legal all>
  107. */
  108. #define BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_OFFSET 0x00000004
  109. #define BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_LSB 0
  110. #define BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_MASK 0x000000ff
  111. /* Description BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER
  112. Consumer: WBM
  113. Producer: SW/FW
  114. In case of 'NULL' pointer, this field is set to 0
  115. Indicates to which buffer manager the buffer OR
  116. MSDU_EXTENSION descriptor OR link descriptor that is being
  117. pointed to shall be returned after the frame has been
  118. processed. It is used by WBM for routing purposes.
  119. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  120. to the WMB buffer idle list
  121. <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
  122. returned to the WMB idle link descriptor idle list
  123. <enum 2 FW_BM> This buffer shall be returned to the FW
  124. <enum 3 SW0_BM> This buffer shall be returned to the SW,
  125. ring 0
  126. <enum 4 SW1_BM> This buffer shall be returned to the SW,
  127. ring 1
  128. <enum 5 SW2_BM> This buffer shall be returned to the SW,
  129. ring 2
  130. <enum 6 SW3_BM> This buffer shall be returned to the SW,
  131. ring 3
  132. <legal 0-6>
  133. */
  134. #define BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
  135. #define BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER_LSB 8
  136. #define BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER_MASK 0x00000700
  137. /* Description BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE
  138. Cookie field exclusively used by SW.
  139. In case of 'NULL' pointer, this field is set to 0
  140. HW ignores the contents, accept that it passes the
  141. programmed value on to other descriptors together with the
  142. physical address
  143. Field can be used by SW to for example associate the
  144. buffers physical address with the virtual address
  145. The bit definitions as used by SW are within SW HLD
  146. specification
  147. NOTE:
  148. The two most significant bits can have a special meaning
  149. in case this struct is embedded in a TX_MPDU_DETAILS STRUCT,
  150. and field transmit_bw_restriction is set
  151. Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
  152. Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
  153. Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
  154. Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
  155. <legal all>
  156. */
  157. #define BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_OFFSET 0x00000004
  158. #define BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_LSB 11
  159. #define BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_MASK 0xfffff800
  160. #endif // _BUFFER_ADDR_INFO_H_