rx_preamble.h 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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_PREAMBLE_H_
  16. #define _RX_PREAMBLE_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_RX_PREAMBLE 2
  20. #define NUM_OF_QWORDS_RX_PREAMBLE 1
  21. struct rx_preamble {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t num_users : 6,
  24. pkt_type : 4,
  25. direction : 1,
  26. reserved_0a : 21;
  27. uint32_t tlv64_padding : 32;
  28. #else
  29. uint32_t reserved_0a : 21,
  30. direction : 1,
  31. pkt_type : 4,
  32. num_users : 6;
  33. uint32_t tlv64_padding : 32;
  34. #endif
  35. };
  36. #define RX_PREAMBLE_NUM_USERS_OFFSET 0x0000000000000000
  37. #define RX_PREAMBLE_NUM_USERS_LSB 0
  38. #define RX_PREAMBLE_NUM_USERS_MSB 5
  39. #define RX_PREAMBLE_NUM_USERS_MASK 0x000000000000003f
  40. #define RX_PREAMBLE_PKT_TYPE_OFFSET 0x0000000000000000
  41. #define RX_PREAMBLE_PKT_TYPE_LSB 6
  42. #define RX_PREAMBLE_PKT_TYPE_MSB 9
  43. #define RX_PREAMBLE_PKT_TYPE_MASK 0x00000000000003c0
  44. #define RX_PREAMBLE_DIRECTION_OFFSET 0x0000000000000000
  45. #define RX_PREAMBLE_DIRECTION_LSB 10
  46. #define RX_PREAMBLE_DIRECTION_MSB 10
  47. #define RX_PREAMBLE_DIRECTION_MASK 0x0000000000000400
  48. #define RX_PREAMBLE_RESERVED_0A_OFFSET 0x0000000000000000
  49. #define RX_PREAMBLE_RESERVED_0A_LSB 11
  50. #define RX_PREAMBLE_RESERVED_0A_MSB 31
  51. #define RX_PREAMBLE_RESERVED_0A_MASK 0x00000000fffff800
  52. #define RX_PREAMBLE_TLV64_PADDING_OFFSET 0x0000000000000000
  53. #define RX_PREAMBLE_TLV64_PADDING_LSB 32
  54. #define RX_PREAMBLE_TLV64_PADDING_MSB 63
  55. #define RX_PREAMBLE_TLV64_PADDING_MASK 0xffffffff00000000
  56. #endif