ack_report.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 _ACK_REPORT_H_
  17. #define _ACK_REPORT_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_ACK_REPORT 1
  21. struct ack_report {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t selfgen_response_reason : 4, // [3:0]
  24. ax_trigger_type : 4, // [7:4]
  25. sr_ppdu : 1, // [8:8]
  26. reserved : 7, // [15:9]
  27. frame_control : 16; // [31:16]
  28. #else
  29. uint32_t frame_control : 16, // [31:16]
  30. reserved : 7, // [15:9]
  31. sr_ppdu : 1, // [8:8]
  32. ax_trigger_type : 4, // [7:4]
  33. selfgen_response_reason : 4; // [3:0]
  34. #endif
  35. };
  36. /* Description SELFGEN_RESPONSE_REASON
  37. Field that indicates why the received frame needs a response
  38. in SIFS time. The possible responses are listed in order.
  39. <enum 0 CTS_frame>
  40. <enum 1 ACK_frame>
  41. <enum 2 BA_frame >
  42. <enum 3 Qboost_trigger> Qboost trigger received
  43. <enum 4 PSPOLL_trigger> PSPOLL trigger received
  44. <enum 5 UAPSD_trigger > Unscheduled APSD trigger received
  45. <enum 6 CBF_frame> the CBF frame needs to be send as
  46. a result of NDP or BRPOLL
  47. <enum 7 ax_su_trigger> 11ax trigger received for this
  48. device
  49. <enum 8 ax_wildcard_trigger> 11ax wildcardtrigger has
  50. been received
  51. <enum 9 ax_unassoc_wildcard_trigger> 11ax wildcard trigger
  52. for unassociated STAs has been received
  53. <enum 12 eht_su_trigger> EHT R1 trigger received for
  54. this device
  55. <enum 10 MU_UL_response_to_response>
  56. <enum 11 Ranging_NDP_LMR_frames> Ranging NDP + LMR need
  57. to be sent in response to ranging NDPA + NDP
  58. <legal 0-12>
  59. */
  60. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_OFFSET 0x00000000
  61. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_LSB 0
  62. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MSB 3
  63. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MASK 0x0000000f
  64. /* Description AX_TRIGGER_TYPE
  65. Field Only valid when selfgen_response_reason is an 11ax
  66. related trigger
  67. The 11AX trigger type/ trigger number:
  68. It identifies which trigger was received.
  69. <enum 0 ax_trigger_basic>
  70. <enum 1 ax_trigger_brpoll>
  71. <enum 2 ax_trigger_mu_bar>
  72. <enum 3 ax_trigger_mu_rts>
  73. <enum 4 ax_trigger_buffer_size>
  74. <enum 5 ax_trigger_gcr_mu_bar>
  75. <enum 6 ax_trigger_BQRP>
  76. <enum 7 ax_trigger_NDP_fb_report_poll>
  77. <enum 8 ax_tb_ranging_trigger>
  78. <enum 9 ax_trigger_reserved_9>
  79. <enum 10 ax_trigger_reserved_10>
  80. <enum 11 ax_trigger_reserved_11>
  81. <enum 12 ax_trigger_reserved_12>
  82. <enum 13 ax_trigger_reserved_13>
  83. <enum 14 ax_trigger_reserved_14>
  84. <enum 15 ax_trigger_reserved_15>
  85. <legal all>
  86. */
  87. #define ACK_REPORT_AX_TRIGGER_TYPE_OFFSET 0x00000000
  88. #define ACK_REPORT_AX_TRIGGER_TYPE_LSB 4
  89. #define ACK_REPORT_AX_TRIGGER_TYPE_MSB 7
  90. #define ACK_REPORT_AX_TRIGGER_TYPE_MASK 0x000000f0
  91. /* Description SR_PPDU
  92. Field only valid with SRP Responder support
  93. Indicates if the received frame was sent using SRP as indicated
  94. by the 'SR PPDU' bit in the 'CAS Control' in the 'HE A-Control'
  95. in one of the MPDUs received
  96. <legal all>
  97. */
  98. #define ACK_REPORT_SR_PPDU_OFFSET 0x00000000
  99. #define ACK_REPORT_SR_PPDU_LSB 8
  100. #define ACK_REPORT_SR_PPDU_MSB 8
  101. #define ACK_REPORT_SR_PPDU_MASK 0x00000100
  102. /* Description RESERVED
  103. <legal 0>
  104. */
  105. #define ACK_REPORT_RESERVED_OFFSET 0x00000000
  106. #define ACK_REPORT_RESERVED_LSB 9
  107. #define ACK_REPORT_RESERVED_MSB 15
  108. #define ACK_REPORT_RESERVED_MASK 0x0000fe00
  109. /* Description FRAME_CONTROL
  110. Field not valid when selfgen_response_reason is MU_UL_response_to_response
  111. For SU receptions:
  112. frame control field of the received frame
  113. In 11ah Mode of Operation, for non-NDP frames the BW information
  114. is extracted from Frame Control fields [11:8].
  115. Decode is as follows
  116. Bits[11] - Dynamic/Static
  117. Bits[10:8] - Channel BW
  118. */
  119. #define ACK_REPORT_FRAME_CONTROL_OFFSET 0x00000000
  120. #define ACK_REPORT_FRAME_CONTROL_LSB 16
  121. #define ACK_REPORT_FRAME_CONTROL_MSB 31
  122. #define ACK_REPORT_FRAME_CONTROL_MASK 0xffff0000
  123. #endif // ACK_REPORT