rx_preamble.h 3.7 KB

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