rx_start_param.h 4.1 KB

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