response_start_status.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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 _RESPONSE_START_STATUS_H_
  17. #define _RESPONSE_START_STATUS_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_RESPONSE_START_STATUS 2
  21. #define NUM_OF_QWORDS_RESPONSE_START_STATUS 1
  22. struct response_start_status {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t generated_response : 3, // [2:0]
  25. ftm_tm : 2, // [4:3]
  26. trig_response_related : 1, // [5:5]
  27. response_sta_count : 7, // [12:6]
  28. reserved : 19; // [31:13]
  29. uint32_t phy_ppdu_id : 16, // [15:0]
  30. sw_peer_id : 16; // [31:16]
  31. #else
  32. uint32_t reserved : 19, // [31:13]
  33. response_sta_count : 7, // [12:6]
  34. trig_response_related : 1, // [5:5]
  35. ftm_tm : 2, // [4:3]
  36. generated_response : 3; // [2:0]
  37. uint32_t sw_peer_id : 16, // [31:16]
  38. phy_ppdu_id : 16; // [15:0]
  39. #endif
  40. };
  41. /* Description GENERATED_RESPONSE
  42. The generated response frame
  43. <enum 0 selfgen_ACK> TXPCU generated an ACK response. Note
  44. that this can be part of a trigger response. In that case
  45. bit trig_response_related will be set as well.
  46. <enum 1 selfgen_CTS> TXPCU generated an CTS response. Note
  47. that this can be part of a trigger response. In that case
  48. bit trig_response_related will be set as well.
  49. <enum 2 selfgen_BA> TXPCU generated a BA response. Note
  50. that this can be part of a trigger response. In that case
  51. bit trig_response_related will be set as well.
  52. <enum 3 selfgen_MBA> TXPCU generated an M BA response. Note
  53. that this can be part of a trigger response. In that case
  54. bit trig_response_related will be set as well.
  55. <enum 4 selfgen_CBF> TXPCU generated a CBF response. Note
  56. that this can be part of a trigger response. In that case
  57. bit trig_response_related will be set as well.
  58. <enum 5 selfgen_other_trig_response>
  59. TXPCU generated a trigger related response of a type not
  60. specified above. Note that in this case bit trig_response_related
  61. will be set as well.
  62. This e-num will also be used when TXPCU has been programmed
  63. to overwrite it's own self gen response generation, and
  64. wait for the response to come from SCH..
  65. Also applicable for basic trigger response.
  66. <enum 6 selfgen_NDP_LMR> TXPCU generated a self-gen NDP
  67. followed by a self-gen LMR for the ranging NDPA followed
  68. by NDP received by RXPCU.
  69. <legal 0-6>
  70. */
  71. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_OFFSET 0x0000000000000000
  72. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_LSB 0
  73. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_MSB 2
  74. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_MASK 0x0000000000000007
  75. /* Description FTM_TM
  76. This field Indicates if the response is related to receiving
  77. a TM or FTM frame
  78. 0: no TM and no FTM frame => there is NO measurement done
  79. 1: FTM frame
  80. 2: TM frame
  81. 3: reserved
  82. */
  83. #define RESPONSE_START_STATUS_FTM_TM_OFFSET 0x0000000000000000
  84. #define RESPONSE_START_STATUS_FTM_TM_LSB 3
  85. #define RESPONSE_START_STATUS_FTM_TM_MSB 4
  86. #define RESPONSE_START_STATUS_FTM_TM_MASK 0x0000000000000018
  87. /* Description TRIG_RESPONSE_RELATED
  88. When set, this TLV is generated by TXPCU in the context
  89. of a response transmission to a received trigger frame.
  90. <legal all>
  91. */
  92. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_OFFSET 0x0000000000000000
  93. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_LSB 5
  94. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_MSB 5
  95. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_MASK 0x0000000000000020
  96. /* Description RESPONSE_STA_COUNT
  97. The number of STAs to which the responses need to be sent.
  98. In case of multiple ACKs/BAs to be send, TXPCU uses this
  99. field to determine what address formatting to use for the
  100. response frame: This could be broadcast or unicast.
  101. <legal all>
  102. */
  103. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_OFFSET 0x0000000000000000
  104. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_LSB 6
  105. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_MSB 12
  106. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_MASK 0x0000000000001fc0
  107. /* Description RESERVED
  108. <legal 0>
  109. */
  110. #define RESPONSE_START_STATUS_RESERVED_OFFSET 0x0000000000000000
  111. #define RESPONSE_START_STATUS_RESERVED_LSB 13
  112. #define RESPONSE_START_STATUS_RESERVED_MSB 31
  113. #define RESPONSE_START_STATUS_RESERVED_MASK 0x00000000ffffe000
  114. /* Description PHY_PPDU_ID
  115. The PHY_PPDU_ID of the received PPDU for which this response
  116. is generated.
  117. */
  118. #define RESPONSE_START_STATUS_PHY_PPDU_ID_OFFSET 0x0000000000000000
  119. #define RESPONSE_START_STATUS_PHY_PPDU_ID_LSB 32
  120. #define RESPONSE_START_STATUS_PHY_PPDU_ID_MSB 47
  121. #define RESPONSE_START_STATUS_PHY_PPDU_ID_MASK 0x0000ffff00000000
  122. /* Description SW_PEER_ID
  123. This field is only valid when Response_STA_count is set
  124. to 1
  125. An identifier indicating for which device this response
  126. is needed.
  127. <legal all>
  128. */
  129. #define RESPONSE_START_STATUS_SW_PEER_ID_OFFSET 0x0000000000000000
  130. #define RESPONSE_START_STATUS_SW_PEER_ID_LSB 48
  131. #define RESPONSE_START_STATUS_SW_PEER_ID_MSB 63
  132. #define RESPONSE_START_STATUS_SW_PEER_ID_MASK 0xffff000000000000
  133. #endif // RESPONSE_START_STATUS