no_ack_report.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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 _NO_ACK_REPORT_H_
  17. #define _NO_ACK_REPORT_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_NO_ACK_REPORT 4
  21. struct no_ack_report {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t no_ack_transmit_reason : 4, // [3:0]
  24. macrx_abort_reason : 4, // [7:4]
  25. phyrx_abort_reason : 8, // [15:8]
  26. frame_control : 16; // [31:16]
  27. uint32_t rx_ppdu_duration : 24, // [23:0]
  28. sr_ppdu_during_obss : 1, // [24:24]
  29. selfgen_response_reason_to_sr_ppdu : 4, // [28:25]
  30. reserved_1 : 3; // [31:29]
  31. uint32_t pre_bt_broadcast_status_details : 12, // [11:0]
  32. first_bt_broadcast_status_details : 12, // [23:12]
  33. reserved_2 : 8; // [31:24]
  34. uint32_t second_bt_broadcast_status_details : 12, // [11:0]
  35. reserved_3 : 20; // [31:12]
  36. #else
  37. uint32_t frame_control : 16, // [31:16]
  38. phyrx_abort_reason : 8, // [15:8]
  39. macrx_abort_reason : 4, // [7:4]
  40. no_ack_transmit_reason : 4; // [3:0]
  41. uint32_t reserved_1 : 3, // [31:29]
  42. selfgen_response_reason_to_sr_ppdu : 4, // [28:25]
  43. sr_ppdu_during_obss : 1, // [24:24]
  44. rx_ppdu_duration : 24; // [23:0]
  45. uint32_t reserved_2 : 8, // [31:24]
  46. first_bt_broadcast_status_details : 12, // [23:12]
  47. pre_bt_broadcast_status_details : 12; // [11:0]
  48. uint32_t reserved_3 : 20, // [31:12]
  49. second_bt_broadcast_status_details : 12; // [11:0]
  50. #endif
  51. };
  52. /* Description NO_ACK_TRANSMIT_REASON
  53. Field that indicates why the received frame is not needing
  54. any transmit response in SIFS time.
  55. The possible responses are listed in order.
  56. <enum 0 NO_ACK_FCS_errors > All received frames have
  57. FCS errors.
  58. <enum 1 Unicast_no_ack_frame_received > All received
  59. frames did not require a response.
  60. <enum 2 NO_ACK_Broadcast> Broadcast frame received
  61. <enum 3 NO_ACK_Multicast> Multicast frame received
  62. <enum 4 Not_directed> Frames received are not directed
  63. to this device (based on addr1)
  64. <enum 5 AST_no_ack> The AST entry indicated that NO
  65. ACK shall be send
  66. <enum 6 PHY_GID_mismatch> PHY dropped the incoming frame
  67. dur to GID mismatch
  68. <enum 7 PHY_AID_mismatch> PHY dropped the incoming frame
  69. dur to AID mismatch
  70. <enum 8 NO_ACK_PHY_error> PHY reported an error during
  71. reception. For details, see the 'phy_error...' fields
  72. <enum 9 RTS_bw_not_available> The requested BW for the
  73. CTS response frame is not available
  74. <enum 10 NDPA_Frame> An NDPA frame got received
  75. <enum 11 NDP_Frame> An NDP frame got received
  76. <enum 12 Trigger_NAV_blocked> a trigger frame was received,
  77. but due to NAV setting, no response could be generated
  78. <enum 13 Trigger_no_AID> A trigger frame was received,
  79. but this device's AID was not in the list
  80. <enum 14 NO_ACK_MAC_ABORT_REQ > No ACK is needed as
  81. SW asked RXPCU to send a abort_request to the PHYRX
  82. <enum 15 no_response_other> placeholder in case non
  83. of the above properly cover the reasons
  84. Also see the field SR_PPDU_during_OBSS.
  85. <legal 0-15>
  86. */
  87. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_OFFSET 0x00000000
  88. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_LSB 0
  89. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_MSB 3
  90. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_MASK 0x0000000f
  91. /* Description MACRX_ABORT_REASON
  92. Field only valid when No_ack_transmit_reason is set to NO_ACK_MAC_ABORT_REQ
  93. Error field received from MACRX_ABORT_REQUEST.Macrx_abort_reason[2:0]
  94. <Legal all>
  95. */
  96. #define NO_ACK_REPORT_MACRX_ABORT_REASON_OFFSET 0x00000000
  97. #define NO_ACK_REPORT_MACRX_ABORT_REASON_LSB 4
  98. #define NO_ACK_REPORT_MACRX_ABORT_REASON_MSB 7
  99. #define NO_ACK_REPORT_MACRX_ABORT_REASON_MASK 0x000000f0
  100. /* Description PHYRX_ABORT_REASON
  101. Field only valid when No_ack_transmit_reason is set to NO_ACK_PHY_error
  102. Error field received from PHYRX_ABORT_REQUEST.Phyrx_abort_reason
  103. <Legal all>
  104. */
  105. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_OFFSET 0x00000000
  106. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_LSB 8
  107. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_MSB 15
  108. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_MASK 0x0000ff00
  109. /* Description FRAME_CONTROL
  110. frame control field of the received (first properly received)
  111. frame
  112. <Legal all>
  113. */
  114. #define NO_ACK_REPORT_FRAME_CONTROL_OFFSET 0x00000000
  115. #define NO_ACK_REPORT_FRAME_CONTROL_LSB 16
  116. #define NO_ACK_REPORT_FRAME_CONTROL_MSB 31
  117. #define NO_ACK_REPORT_FRAME_CONTROL_MASK 0xffff0000
  118. /* Description RX_PPDU_DURATION
  119. The length of this PPDU reception in us
  120. <Legal all>
  121. */
  122. #define NO_ACK_REPORT_RX_PPDU_DURATION_OFFSET 0x00000004
  123. #define NO_ACK_REPORT_RX_PPDU_DURATION_LSB 0
  124. #define NO_ACK_REPORT_RX_PPDU_DURATION_MSB 23
  125. #define NO_ACK_REPORT_RX_PPDU_DURATION_MASK 0x00ffffff
  126. /* Description SR_PPDU_DURING_OBSS
  127. Field only valid with SRP Responder support
  128. Indicates that the received frame was sent using SRP as
  129. indicated by the 'SR PPDU' bit in the 'CAS Control' in the
  130. 'HE A-Control' in one of the MPDUs received, and that the
  131. response could not be generated due to OBSS traffic setting
  132. the NAV
  133. <legal all>
  134. */
  135. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_OFFSET 0x00000004
  136. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_LSB 24
  137. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_MSB 24
  138. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_MASK 0x01000000
  139. /* Description SELFGEN_RESPONSE_REASON_TO_SR_PPDU
  140. Field only valid with SRP Responder support
  141. This field indicates why the received SR PPDU needs a response
  142. in SIFS time. The e-num used is the same as in the field
  143. selfgen_response_reason in 'ACK_REPORT' structure although
  144. some of these will be unused in case of an SR PPDU.
  145. <enum 0 CTS_frame>
  146. <enum 1 ACK_frame>
  147. <enum 2 BA_frame >
  148. <enum 3 Qboost_trigger> Qboost trigger received
  149. <enum 4 PSPOLL_trigger> PSPOLL trigger received
  150. <enum 5 UAPSD_trigger > Unscheduled APSD trigger received
  151. <enum 6 CBF_frame> the CBF frame needs to be send as
  152. a result of NDP or BRPOLL
  153. <enum 7 ax_su_trigger> 11ax trigger received for this
  154. device
  155. <enum 8 ax_wildcard_trigger> 11ax wildcardtrigger has
  156. been received
  157. <enum 9 ax_unassoc_wildcard_trigger> 11ax wildcard trigger
  158. for unassociated STAs has been received
  159. <enum 12 eht_su_trigger> EHT R1 trigger received for
  160. this device
  161. <enum 10 MU_UL_response_to_response>
  162. <enum 11 Ranging_NDP_LMR_frames> Ranging NDP + LMR need
  163. to be sent in response to ranging NDPA + NDP
  164. <legal 0-12>
  165. */
  166. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_OFFSET 0x00000004
  167. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_LSB 25
  168. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_MSB 28
  169. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_MASK 0x1e000000
  170. /* Description RESERVED_1
  171. <legal all>
  172. */
  173. #define NO_ACK_REPORT_RESERVED_1_OFFSET 0x00000004
  174. #define NO_ACK_REPORT_RESERVED_1_LSB 29
  175. #define NO_ACK_REPORT_RESERVED_1_MSB 31
  176. #define NO_ACK_REPORT_RESERVED_1_MASK 0xe0000000
  177. /* Description PRE_BT_BROADCAST_STATUS_DETAILS
  178. Same contents as field "bt_broadcast_status_details" for
  179. the first received COEX_STATUS_BROADCAST tlv during this
  180. PPDU reception.
  181. After power up, this field is all initialized to 0
  182. Bits: [31:28]: always 0
  183. <legal all>
  184. */
  185. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x00000008
  186. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_LSB 0
  187. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_MSB 11
  188. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_MASK 0x00000fff
  189. /* Description FIRST_BT_BROADCAST_STATUS_DETAILS
  190. Same contents as field "bt_broadcast_status_details" for
  191. the first received COEX_STATUS_BROADCAST tlv during this
  192. PPDU reception.
  193. If no COEX_STATUS_BROADCAST tlv is received during this
  194. PPDU reception, this field will be set to 0
  195. <legal all>
  196. */
  197. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x00000008
  198. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_LSB 12
  199. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_MSB 23
  200. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_MASK 0x00fff000
  201. /* Description RESERVED_2
  202. <legal 0>
  203. */
  204. #define NO_ACK_REPORT_RESERVED_2_OFFSET 0x00000008
  205. #define NO_ACK_REPORT_RESERVED_2_LSB 24
  206. #define NO_ACK_REPORT_RESERVED_2_MSB 31
  207. #define NO_ACK_REPORT_RESERVED_2_MASK 0xff000000
  208. /* Description SECOND_BT_BROADCAST_STATUS_DETAILS
  209. Same contents as field "bt_broadcast_status_details" for
  210. the second received COEX_STATUS_BROADCAST tlv during this
  211. PPDU reception.
  212. If no second COEX_STATUS_BROADCAST tlv is received during
  213. this PPDU reception, this field will be set to 0
  214. <legal all>
  215. */
  216. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x0000000c
  217. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_LSB 0
  218. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_MSB 11
  219. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_MASK 0x00000fff
  220. /* Description RESERVED_3
  221. <legal 0>
  222. */
  223. #define NO_ACK_REPORT_RESERVED_3_OFFSET 0x0000000c
  224. #define NO_ACK_REPORT_RESERVED_3_LSB 12
  225. #define NO_ACK_REPORT_RESERVED_3_MSB 31
  226. #define NO_ACK_REPORT_RESERVED_3_MASK 0xfffff000
  227. #endif // NO_ACK_REPORT