rx_start_param.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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_START_PARAM_H_
  16. #define _RX_START_PARAM_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_RX_START_PARAM 2
  20. #define NUM_OF_QWORDS_RX_START_PARAM 1
  21. struct rx_start_param {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t pkt_type : 4, // [3:0]
  24. reserved_0a : 12, // [15:4]
  25. remaining_rx_time : 16; // [31:16]
  26. uint32_t tlv64_padding : 32; // [31:0]
  27. #else
  28. uint32_t remaining_rx_time : 16, // [31:16]
  29. reserved_0a : 12, // [15:4]
  30. pkt_type : 4; // [3:0]
  31. uint32_t tlv64_padding : 32; // [31:0]
  32. #endif
  33. };
  34. /* Description PKT_TYPE
  35. Packet type:
  36. <enum 0 dot11a>802.11a PPDU type
  37. <enum 1 dot11b>802.11b PPDU type
  38. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  39. <enum 3 dot11ac>802.11ac PPDU type
  40. <enum 4 dot11ax>802.11ax PPDU type
  41. <enum 5 dot11ba>802.11ba (WUR) PPDU type
  42. <enum 6 dot11be>802.11be PPDU type
  43. <enum 7 dot11az>802.11az (ranging) PPDU type
  44. <enum 8 dot11n_gf>802.11n Green Field PPDU type (unsupported
  45. & aborted)
  46. */
  47. #define RX_START_PARAM_PKT_TYPE_OFFSET 0x0000000000000000
  48. #define RX_START_PARAM_PKT_TYPE_LSB 0
  49. #define RX_START_PARAM_PKT_TYPE_MSB 3
  50. #define RX_START_PARAM_PKT_TYPE_MASK 0x000000000000000f
  51. /* Description RESERVED_0A
  52. <legal 0>
  53. */
  54. #define RX_START_PARAM_RESERVED_0A_OFFSET 0x0000000000000000
  55. #define RX_START_PARAM_RESERVED_0A_LSB 4
  56. #define RX_START_PARAM_RESERVED_0A_MSB 15
  57. #define RX_START_PARAM_RESERVED_0A_MASK 0x000000000000fff0
  58. /* Description REMAINING_RX_TIME
  59. Remaining time (in us) for the current frame in the medium.
  60. (received from PHY in TLV: PHYRX_COMMON_USER_INFO.Receive_duration)
  61. <legal all>
  62. */
  63. #define RX_START_PARAM_REMAINING_RX_TIME_OFFSET 0x0000000000000000
  64. #define RX_START_PARAM_REMAINING_RX_TIME_LSB 16
  65. #define RX_START_PARAM_REMAINING_RX_TIME_MSB 31
  66. #define RX_START_PARAM_REMAINING_RX_TIME_MASK 0x00000000ffff0000
  67. /* Description TLV64_PADDING
  68. Automatic DWORD padding inserted while converting TLV32
  69. to TLV64 for 64 bit ARCH
  70. <legal 0>
  71. */
  72. #define RX_START_PARAM_TLV64_PADDING_OFFSET 0x0000000000000000
  73. #define RX_START_PARAM_TLV64_PADDING_LSB 32
  74. #define RX_START_PARAM_TLV64_PADDING_MSB 63
  75. #define RX_START_PARAM_TLV64_PADDING_MASK 0xffffffff00000000
  76. #endif // RX_START_PARAM