rx_trig_info.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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 _RX_TRIG_INFO_H_
  17. #define _RX_TRIG_INFO_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_RX_TRIG_INFO 2
  21. #define NUM_OF_QWORDS_RX_TRIG_INFO 1
  22. struct rx_trig_info {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t rx_trigger_frame_type : 2, // [1:0]
  25. trigger_resp_type : 3, // [4:2]
  26. reserved_0 : 27; // [31:5]
  27. uint32_t ppdu_duration : 16, // [15:0]
  28. unique_destination_id : 16; // [31:16]
  29. #else
  30. uint32_t reserved_0 : 27, // [31:5]
  31. trigger_resp_type : 3, // [4:2]
  32. rx_trigger_frame_type : 2; // [1:0]
  33. uint32_t unique_destination_id : 16, // [31:16]
  34. ppdu_duration : 16; // [15:0]
  35. #endif
  36. };
  37. /* Description RX_TRIGGER_FRAME_TYPE
  38. Trigger frame type.
  39. Field not really needed by PDG, but is there for debugging
  40. purposes to be put in event.
  41. <enum 0 dot11ax_direct_trigger_frame>
  42. <enum 1 dot11ax_wildcard_trigger_frame>
  43. <enum 2 dot11ax_usassoc_wildcard_trigger_frame>
  44. <legal 0-2>
  45. */
  46. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_OFFSET 0x0000000000000000
  47. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_LSB 0
  48. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_MSB 1
  49. #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_MASK 0x0000000000000003
  50. /* Description TRIGGER_RESP_TYPE
  51. Indicates what kind of response is required to the received
  52. OFDMA trigger...
  53. Field not really needed by PDG, but is there for debugging
  54. purposes to be put in event.
  55. <enum 0 OFDMA_ACK_frame> OFDMA trigger indicates an OFDMA
  56. based transmission, where the contents shall be and ACK
  57. frame.
  58. <enum 1 OFDMA_BA_frames> OFDMA trigger indicates an OFDMA
  59. based transmission, where the contents shall be a BA frame.
  60. <enum 2 OFDMA_DATA_frames> OFDMA trigger indicates an OFDMA
  61. based transmission, where the contents shall be only data.
  62. <enum 3 OFDMA_BA_DATA_frames> OFDMA trigger indicates an
  63. OFDMA based transmission, where the contents shall be a
  64. BA frame and data.
  65. <legal 0-3>
  66. */
  67. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_OFFSET 0x0000000000000000
  68. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_LSB 2
  69. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_MSB 4
  70. #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_MASK 0x000000000000001c
  71. /* Description RESERVED_0
  72. Reserved and unused by HW
  73. <legal 0>
  74. */
  75. #define RX_TRIG_INFO_RESERVED_0_OFFSET 0x0000000000000000
  76. #define RX_TRIG_INFO_RESERVED_0_LSB 5
  77. #define RX_TRIG_INFO_RESERVED_0_MSB 31
  78. #define RX_TRIG_INFO_RESERVED_0_MASK 0x00000000ffffffe0
  79. /* Description PPDU_DURATION
  80. 11ax
  81. This field is valid only when rx_trig_frame is dot11ax_direct_trigger_frame
  82. or dot11ax_wildcard_trigger_frame or dot11ax_usassoc_wildcard_trigger_frame
  83. The PPDU duration populated in trigger frame. This is the
  84. duration that station is allowed to use to transmit the
  85. packet
  86. */
  87. #define RX_TRIG_INFO_PPDU_DURATION_OFFSET 0x0000000000000000
  88. #define RX_TRIG_INFO_PPDU_DURATION_LSB 32
  89. #define RX_TRIG_INFO_PPDU_DURATION_MSB 47
  90. #define RX_TRIG_INFO_PPDU_DURATION_MASK 0x0000ffff00000000
  91. /* Description UNIQUE_DESTINATION_ID
  92. 11ax
  93. This field is valid only when rx_trig_frame is dot11ax_direct_trigger_frame
  94. or dot11ax_wildcard_trigger_frame or dot11ax_usassoc_wildcard_trigger_frame
  95. Unique destination identification number used by HWSCH to
  96. compare with the station ID in the command
  97. */
  98. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_OFFSET 0x0000000000000000
  99. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_LSB 48
  100. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_MSB 63
  101. #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_MASK 0xffff000000000000
  102. #endif // RX_TRIG_INFO