cdp_txrx_extd_struct.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _CDP_TXRX_EXTD_STRUCT_H_
  19. #define _CDP_TXRX_EXTD_STRUCT_H_
  20. /* Maximum number of receive chains */
  21. #define CDP_MAX_RX_CHAINS 8
  22. #ifdef WLAN_RX_PKT_CAPTURE_ENH
  23. /**
  24. * struct cdp_rx_indication_mpdu_info - Rx MPDU info
  25. * @ppdu_id: PPDU Id
  26. * @duration: PPDU duration
  27. * @first_data_seq_ctrl: Sequence control field of first data frame
  28. * @ltf_size: ltf_size
  29. * @stbc: When set, STBC rate was used
  30. * @he_re: he_re (range extension)
  31. * @bw: Bandwidth
  32. * <enum 0 bw_20_MHz>
  33. * <enum 1 bw_40_MHz>
  34. * <enum 2 bw_80_MHz>
  35. * <enum 3 bw_160_MHz>
  36. * @nss: NSS 1,2, ...8
  37. * @mcs: MCS index
  38. * @preamble: preamble
  39. * @gi: <enum 0 0_8_us_sgi > Legacy normal GI
  40. * <enum 1 0_4_us_sgi > Legacy short GI
  41. * <enum 2 1_6_us_sgi > HE related GI
  42. * <enum 3 3_2_us_sgi > HE
  43. * @dcm: dcm
  44. * @ldpc: ldpc
  45. * @fcs_err: FCS error
  46. * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/
  47. * UL_BSR_TRIG/UNKNOWN
  48. * @rate: legacy packet rate
  49. * @rssi_comb: Combined RSSI value (units = dB above noise floor)
  50. * @nf: noise floor
  51. * @timestamp: TSF at the reception of PPDU
  52. * @length: PPDU length
  53. * @per_chain_rssi: RSSI per chain
  54. * @channel: Channel informartion
  55. */
  56. struct cdp_rx_indication_mpdu_info {
  57. uint32_t ppdu_id;
  58. uint16_t duration;
  59. uint16_t first_data_seq_ctrl;
  60. uint64_t ltf_size:2,
  61. stbc:1,
  62. he_re:1,
  63. bw:4,
  64. ofdma_info_valid:1,
  65. ofdma_ru_start_index:7,
  66. ofdma_ru_width:7,
  67. nss:4,
  68. mcs:4,
  69. preamble:4,
  70. gi:4,
  71. dcm:1,
  72. ldpc:1,
  73. fcs_err:1,
  74. ppdu_type:5,
  75. rate:8;
  76. uint32_t rssi_comb;
  77. uint32_t nf;
  78. uint64_t timestamp;
  79. uint32_t length;
  80. uint8_t per_chain_rssi[MAX_CHAIN];
  81. uint8_t channel;
  82. };
  83. /**
  84. * struct cdp_rx_indication_mpdu- Rx MPDU plus MPDU info
  85. * @mpdu_info: defined in cdp_rx_indication_mpdu_info
  86. * @data: skb chain of a MPDU. The first of 128 Byte of MPDU
  87. * chained with first of 128 Byte of MSDUs.
  88. */
  89. struct cdp_rx_indication_mpdu {
  90. struct cdp_rx_indication_mpdu_info mpdu_info;
  91. qdf_nbuf_t nbuf;
  92. };
  93. #endif /* WLAN_RX_PKT_CAPTURE_ENH */
  94. #endif /* _CDP_TXRX_EXTD_STRUCT_H_ */