buffer_addr_info.h 7.1 KB

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