rx_trig_info.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _RX_TRIG_INFO_H_
  16. #define _RX_TRIG_INFO_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_RX_TRIG_INFO 2
  20. #define NUM_OF_QWORDS_RX_TRIG_INFO 1
  21. struct rx_trig_info {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t rx_trigger_frame_type : 2, // [1:0]
  24. trigger_resp_type : 3, // [4:2]
  25. reserved_0 : 27; // [31:5]
  26. uint32_t ppdu_duration : 16, // [15:0]
  27. unique_destination_id : 16; // [31:16]
  28. #else
  29. uint32_t reserved_0 : 27, // [31:5]
  30. trigger_resp_type : 3, // [4:2]
  31. rx_trigger_frame_type : 2; // [1:0]
  32. uint32_t unique_destination_id : 16, // [31:16]
  33. ppdu_duration : 16; // [15:0]
  34. #endif
  35. };
  36. /* Description RX_TRIGGER_FRAME_TYPE
  37. Trigger frame type.
  38. Field not really needed by PDG, but is there for debugging
  39. purposes to be put in event.
  40. <enum 0 dot11ax_direct_trigger_frame>
  41. <enum 1 dot11ax_wildcard_trigger_frame>
  42. <enum 2 dot11ax_usassoc_wildcard_trigger_frame>
  43. <legal 0-2>
  44. */
  45. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_OFFSET 0x0000000000000000
  46. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_LSB 0
  47. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_MSB 1
  48. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_MASK 0x0000000000000003
  49. /* Description TRIGGER_RESP_TYPE
  50. Indicates what kind of response is required to the received
  51. OFDMA trigger...
  52. Field not really needed by PDG, but is there for debugging
  53. purposes to be put in event.
  54. <enum 0 OFDMA_ACK_frame> OFDMA trigger indicates an OFDMA
  55. based transmission, where the contents shall be and ACK
  56. frame.
  57. <enum 1 OFDMA_BA_frames> OFDMA trigger indicates an OFDMA
  58. based transmission, where the contents shall be a BA frame.
  59. <enum 2 OFDMA_DATA_frames> OFDMA trigger indicates an OFDMA
  60. based transmission, where the contents shall be only data.
  61. <enum 3 OFDMA_BA_DATA_frames> OFDMA trigger indicates an
  62. OFDMA based transmission, where the contents shall be a
  63. BA frame and data.
  64. <legal 0-3>
  65. */
  66. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_OFFSET 0x0000000000000000
  67. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_LSB 2
  68. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_MSB 4
  69. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_MASK 0x000000000000001c
  70. /* Description RESERVED_0
  71. Reserved and unused by HW
  72. <legal 0>
  73. */
  74. #define RX_TRIG_INFO_RESERVED_0_OFFSET 0x0000000000000000
  75. #define RX_TRIG_INFO_RESERVED_0_LSB 5
  76. #define RX_TRIG_INFO_RESERVED_0_MSB 31
  77. #define RX_TRIG_INFO_RESERVED_0_MASK 0x00000000ffffffe0
  78. /* Description PPDU_DURATION
  79. 11ax
  80. This field is valid only when rx_trig_frame is dot11ax_direct_trigger_frame
  81. or dot11ax_wildcard_trigger_frame or dot11ax_usassoc_wildcard_trigger_frame
  82. The PPDU duration populated in trigger frame. This is the
  83. duration that station is allowed to use to transmit the
  84. packet
  85. */
  86. #define RX_TRIG_INFO_PPDU_DURATION_OFFSET 0x0000000000000000
  87. #define RX_TRIG_INFO_PPDU_DURATION_LSB 32
  88. #define RX_TRIG_INFO_PPDU_DURATION_MSB 47
  89. #define RX_TRIG_INFO_PPDU_DURATION_MASK 0x0000ffff00000000
  90. /* Description UNIQUE_DESTINATION_ID
  91. 11ax
  92. This field is valid only when rx_trig_frame is dot11ax_direct_trigger_frame
  93. or dot11ax_wildcard_trigger_frame or dot11ax_usassoc_wildcard_trigger_frame
  94. Unique destination identification number used by HWSCH to
  95. compare with the station ID in the command
  96. */
  97. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_OFFSET 0x0000000000000000
  98. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_LSB 48
  99. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_MSB 63
  100. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_MASK 0xffff000000000000
  101. #endif // RX_TRIG_INFO