pdg_tx_req.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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 _PDG_TX_REQ_H_
  17. #define _PDG_TX_REQ_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_PDG_TX_REQ 2
  21. #define NUM_OF_QWORDS_PDG_TX_REQ 1
  22. struct pdg_tx_req {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t tx_reason : 2, // [1:0]
  25. use_puncture_pattern : 2, // [3:2]
  26. req_bw : 3, // [6:4]
  27. puncture_pattern_number : 6, // [12:7]
  28. reserved_0b : 1, // [13:13]
  29. req_paprd : 1, // [14:14]
  30. duration_field_boundary_valid : 1, // [15:15]
  31. duration_field_boundary : 16; // [31:16]
  32. uint32_t puncture_subband_mask : 16, // [15:0]
  33. reserved_0c : 16; // [31:16]
  34. #else
  35. uint32_t duration_field_boundary : 16, // [31:16]
  36. duration_field_boundary_valid : 1, // [15:15]
  37. req_paprd : 1, // [14:14]
  38. reserved_0b : 1, // [13:13]
  39. puncture_pattern_number : 6, // [12:7]
  40. req_bw : 3, // [6:4]
  41. use_puncture_pattern : 2, // [3:2]
  42. tx_reason : 2; // [1:0]
  43. uint32_t reserved_0c : 16, // [31:16]
  44. puncture_subband_mask : 16; // [15:0]
  45. #endif
  46. };
  47. /* Description TX_REASON
  48. <enum 0 tx_fes_protection_frame> RTS, CTS2Self or 11h
  49. protection type transmission preceding the regular PPDU
  50. portion of the coming FES.
  51. <enum 1 tx_fes_after_protection > Regular PPDU transmission
  52. that follows the transmission of medium protection frames:.
  53. <enum 2 tx_fes_only> Regular PPDU transmission without
  54. preceding medium protection frame exchanges.
  55. Note: Response frame transmissions are initiated with the
  56. PDG_RESPONSE TLV
  57. <legal 0-2>
  58. */
  59. #define PDG_TX_REQ_TX_REASON_OFFSET 0x0000000000000000
  60. #define PDG_TX_REQ_TX_REASON_LSB 0
  61. #define PDG_TX_REQ_TX_REASON_MSB 1
  62. #define PDG_TX_REQ_TX_REASON_MASK 0x0000000000000003
  63. #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_OFFSET 0x0000000000000000
  64. #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_LSB 2
  65. #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_MSB 3
  66. #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_MASK 0x000000000000000c
  67. /* Description REQ_BW
  68. Field not valid when use_puncture_pattern is set to PUNCTURE_FROM_TX_SETUP
  69. The BW of the upcoming transmission.
  70. Note: Coex might have changed this from the original request.
  71. <enum 0 20_mhz>20 Mhz BW
  72. <enum 1 40_mhz>40 Mhz BW
  73. <enum 2 80_mhz>80 Mhz BW
  74. <enum 3 160_mhz>160 Mhz BW
  75. <enum 4 320_mhz>320 Mhz BW
  76. <enum 5 240_mhz>240 Mhz BW
  77. */
  78. #define PDG_TX_REQ_REQ_BW_OFFSET 0x0000000000000000
  79. #define PDG_TX_REQ_REQ_BW_LSB 4
  80. #define PDG_TX_REQ_REQ_BW_MSB 6
  81. #define PDG_TX_REQ_REQ_BW_MASK 0x0000000000000070
  82. /* Description PUNCTURE_PATTERN_NUMBER
  83. Field only valid when "use_puncture_pattern" is set.
  84. The pattern number in case punctured transmission is enabled
  85. <legal all>
  86. */
  87. #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_OFFSET 0x0000000000000000
  88. #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_LSB 7
  89. #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_MSB 12
  90. #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_MASK 0x0000000000001f80
  91. /* Description RESERVED_0B
  92. <legal 0>
  93. */
  94. #define PDG_TX_REQ_RESERVED_0B_OFFSET 0x0000000000000000
  95. #define PDG_TX_REQ_RESERVED_0B_LSB 13
  96. #define PDG_TX_REQ_RESERVED_0B_MSB 13
  97. #define PDG_TX_REQ_RESERVED_0B_MASK 0x0000000000002000
  98. #define PDG_TX_REQ_REQ_PAPRD_OFFSET 0x0000000000000000
  99. #define PDG_TX_REQ_REQ_PAPRD_LSB 14
  100. #define PDG_TX_REQ_REQ_PAPRD_MSB 14
  101. #define PDG_TX_REQ_REQ_PAPRD_MASK 0x0000000000004000
  102. /* Description DURATION_FIELD_BOUNDARY_VALID
  103. When set, PDG should take the 'duration_field_boundary'
  104. value into account when it is calculating the TX and RX
  105. boundaries for the upcoming transmission. Both RX and TX
  106. should not go beyond this time duration provided.
  107. <legal all>
  108. */
  109. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_OFFSET 0x0000000000000000
  110. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_LSB 15
  111. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_MSB 15
  112. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_MASK 0x0000000000008000
  113. /* Description DURATION_FIELD_BOUNDARY
  114. Field only valid when 'Duration_field_boundary_valid' is
  115. set
  116. Amount of time to both TX and RX boundaries that PDG should
  117. take into account for the upcoming transmission.
  118. <legal all>
  119. */
  120. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_OFFSET 0x0000000000000000
  121. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_LSB 16
  122. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_MSB 31
  123. #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_MASK 0x00000000ffff0000
  124. /* Description PUNCTURE_SUBBAND_MASK
  125. Field only valid when use_puncture_pattern is set to PUNCTURE_FROM_ALL_ALLOWED_MODES
  126. This mask indicates which 20 Mhz channels are actively used
  127. in this transmission.
  128. Bit 0: primary 20 Mhz
  129. Bit 1: secondary 20 MHz
  130. Etc.
  131. <legal all>
  132. */
  133. #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_OFFSET 0x0000000000000000
  134. #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_LSB 32
  135. #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_MSB 47
  136. #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_MASK 0x0000ffff00000000
  137. /* Description RESERVED_0C
  138. Reserved for future power bits: Generator should set to
  139. 0, consumer shall ignore <legal 0>
  140. */
  141. #define PDG_TX_REQ_RESERVED_0C_OFFSET 0x0000000000000000
  142. #define PDG_TX_REQ_RESERVED_0C_LSB 48
  143. #define PDG_TX_REQ_RESERVED_0C_MSB 63
  144. #define PDG_TX_REQ_RESERVED_0C_MASK 0xffff000000000000
  145. #endif // PDG_TX_REQ