cdp_txrx_extd_struct.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. * @rssi_comb: Combined RSSI value (units = dB above noise floor)
  49. * @nf: noise floor
  50. * @timestamp: TSF at the reception of PPDU
  51. * @length: PPDU length
  52. * @per_chain_rssi: RSSI per chain
  53. * @channel: Channel informartion
  54. */
  55. struct cdp_rx_indication_mpdu_info {
  56. uint32_t ppdu_id;
  57. uint16_t duration;
  58. uint16_t first_data_seq_ctrl;
  59. uint64_t ltf_size:2,
  60. stbc:1,
  61. he_re:1,
  62. bw:4,
  63. ofdma_info_valid:1,
  64. ofdma_ru_start_index:7,
  65. ofdma_ru_width:7,
  66. nss:4,
  67. mcs:4,
  68. preamble:4,
  69. gi:4,
  70. dcm:1,
  71. ldpc:1,
  72. fcs_err:1,
  73. ppdu_type:5;
  74. uint32_t rssi_comb;
  75. uint32_t nf;
  76. uint64_t timestamp;
  77. uint32_t length;
  78. uint8_t per_chain_rssi[MAX_CHAIN];
  79. uint8_t channel;
  80. };
  81. /**
  82. * struct cdp_rx_indication_mpdu- Rx MPDU plus MPDU info
  83. * @mpdu_info: defined in cdp_rx_indication_mpdu_info
  84. * @data: skb chain of a MPDU. The first of 128 Byte of MPDU
  85. * chained with first of 128 Byte of MSDUs.
  86. */
  87. struct cdp_rx_indication_mpdu {
  88. struct cdp_rx_indication_mpdu_info mpdu_info;
  89. qdf_nbuf_t nbuf;
  90. };
  91. #endif /* WLAN_RX_PKT_CAPTURE_ENH */
  92. #endif /* _CDP_TXRX_EXTD_STRUCT_H_ */