l_sig_b_info.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 _L_SIG_B_INFO_H_
  16. #define _L_SIG_B_INFO_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_L_SIG_B_INFO 1
  20. struct l_sig_b_info {
  21. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  22. uint32_t rate : 4, // [3:0]
  23. length : 12, // [15:4]
  24. reserved : 15, // [30:16]
  25. rx_integrity_check_passed : 1; // [31:31]
  26. #else
  27. uint32_t rx_integrity_check_passed : 1, // [31:31]
  28. reserved : 15, // [30:16]
  29. length : 12, // [15:4]
  30. rate : 4; // [3:0]
  31. #endif
  32. };
  33. /* Description RATE
  34. <enum 1 dsss_1_mpbs_long> DSSS 1 Mbps long
  35. <enum 2 dsss_2_mbps_long> DSSS 2 Mbps long
  36. <enum 3 cck_5_5_mbps_long> CCK 5.5 Mbps long
  37. <enum 4 cck_11_mbps_long> CCK 11 Mbps long
  38. <enum 5 dsss_2_mbps_short> DSSS 2 Mbps short
  39. <enum 6 cck_5_5_mbps_short> CCK 5.5 Mbps short
  40. <enum 7 cck_11_mbps_short> CCK 11 Mbps short
  41. <legal 1-7>
  42. */
  43. #define L_SIG_B_INFO_RATE_OFFSET 0x00000000
  44. #define L_SIG_B_INFO_RATE_LSB 0
  45. #define L_SIG_B_INFO_RATE_MSB 3
  46. #define L_SIG_B_INFO_RATE_MASK 0x0000000f
  47. /* Description LENGTH
  48. The length indicates the number of octets in this MPDU.
  49. <legal all>
  50. */
  51. #define L_SIG_B_INFO_LENGTH_OFFSET 0x00000000
  52. #define L_SIG_B_INFO_LENGTH_LSB 4
  53. #define L_SIG_B_INFO_LENGTH_MSB 15
  54. #define L_SIG_B_INFO_LENGTH_MASK 0x0000fff0
  55. /* Description RESERVED
  56. Reserved: Should be set to 0 by the transmitting MAC and
  57. ignored by the PHY <legal 0>
  58. */
  59. #define L_SIG_B_INFO_RESERVED_OFFSET 0x00000000
  60. #define L_SIG_B_INFO_RESERVED_LSB 16
  61. #define L_SIG_B_INFO_RESERVED_MSB 30
  62. #define L_SIG_B_INFO_RESERVED_MASK 0x7fff0000
  63. /* Description RX_INTEGRITY_CHECK_PASSED
  64. TX side: Set to 0
  65. RX side: Set to 1 if PHY determines the .11b PHY header
  66. CRC check has passed, else set to 0
  67. <legal all>
  68. */
  69. #define L_SIG_B_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x00000000
  70. #define L_SIG_B_INFO_RX_INTEGRITY_CHECK_PASSED_LSB 31
  71. #define L_SIG_B_INFO_RX_INTEGRITY_CHECK_PASSED_MSB 31
  72. #define L_SIG_B_INFO_RX_INTEGRITY_CHECK_PASSED_MASK 0x80000000
  73. #endif // L_SIG_B_INFO