cdp_txrx_mon_struct.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. /*
  2. * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * @file cdp_txrx_mon_struct.h
  21. * @brief Define the monitor mode API structure
  22. * shared by data path and the OS interface module
  23. */
  24. #ifndef _CDP_TXRX_MON_STRUCT_H_
  25. #define _CDP_TXRX_MON_STRUCT_H_
  26. #ifdef QCA_SUPPORT_LITE_MONITOR
  27. #define CDP_LITE_MON_PEER_MAX 16
  28. #define CDP_LITE_MON_LEN_64B 0x40
  29. #define CDP_LITE_MON_LEN_128B 0x80
  30. #define CDP_LITE_MON_LEN_256B 0x100
  31. #define CDP_LITE_MON_LEN_FULL 0xFFFF
  32. #define CDP_LITE_MON_FILTER_ALL 0xFFFF
  33. /* This should align with nac mac type enumerations in ieee80211_ioctl.h */
  34. #define CDP_LITE_MON_PEER_MAC_TYPE_CLIENT 2
  35. /* lite mon filter modes */
  36. enum cdp_lite_mon_filter_mode {
  37. /* mode filter pass */
  38. CDP_LITE_MON_MODE_FP = 0,
  39. /* mode monitor direct */
  40. CDP_LITE_MON_MODE_MD = 1,
  41. /* mode monitor other */
  42. CDP_LITE_MON_MODE_MO = 2,
  43. /* mode filter pass monitor other */
  44. CDP_LITE_MON_MODE_FP_MO = 3,
  45. /* max filter modes */
  46. CDP_LITE_MON_MODE_MAX = 4,
  47. };
  48. /* lite mon frame levels */
  49. enum cdp_lite_mon_level {
  50. /* level invalid */
  51. CDP_LITE_MON_LEVEL_INVALID = 0,
  52. /* level msdu */
  53. CDP_LITE_MON_LEVEL_MSDU = 1,
  54. /* level mpdu */
  55. CDP_LITE_MON_LEVEL_MPDU = 2,
  56. /* level ppdu */
  57. CDP_LITE_MON_LEVEL_PPDU = 3,
  58. };
  59. /* lite mon frame types */
  60. enum cdp_lite_mon_frm_type {
  61. /* frm type mgmt */
  62. CDP_LITE_MON_FRM_TYPE_MGMT = 0,
  63. /* frm type ctrl */
  64. CDP_LITE_MON_FRM_TYPE_CTRL = 1,
  65. /* frm type data */
  66. CDP_LITE_MON_FRM_TYPE_DATA = 2,
  67. /* max frame types */
  68. CDP_LITE_MON_FRM_TYPE_MAX = 3,
  69. };
  70. /* lite mon peer action */
  71. enum cdp_lite_mon_peer_action {
  72. /* peer add */
  73. CDP_LITE_MON_PEER_ADD = 0,
  74. /* peer remove */
  75. CDP_LITE_MON_PEER_REMOVE = 1,
  76. };
  77. /* lite mon peer types */
  78. enum cdp_lite_mon_peer_type {
  79. /* associated peer */
  80. CDP_LITE_MON_PEER_TYPE_ASSOCIATED = 0,
  81. /* non associated peer */
  82. CDP_LITE_MON_PEER_TYPE_NON_ASSOCIATED = 1,
  83. /* max peer types */
  84. CDP_LITE_MON_PEER_TYPE_MAX = 2,
  85. };
  86. /* lite mon config direction */
  87. enum cdp_lite_mon_direction {
  88. /* lite mon config direction rx */
  89. CDP_LITE_MON_DIRECTION_RX = 1,
  90. /* lite mon config direction tx */
  91. CDP_LITE_MON_DIRECTION_TX = 2,
  92. };
  93. #endif
  94. /* Same as MAX_20MHZ_SEGMENTS */
  95. #define CDP_MAX_20MHZ_SEGS 16
  96. /* Same as MAX_ANTENNA_EIGHT */
  97. #define CDP_MAX_NUM_ANTENNA 8
  98. /* XXX not really a mode; there are really multiple PHY's */
  99. enum cdp_mon_phymode {
  100. /* autoselect */
  101. CDP_IEEE80211_MODE_AUTO = 0,
  102. /* 5GHz, OFDM */
  103. CDP_IEEE80211_MODE_11A = 1,
  104. /* 2GHz, CCK */
  105. CDP_IEEE80211_MODE_11B = 2,
  106. /* 2GHz, OFDM */
  107. CDP_IEEE80211_MODE_11G = 3,
  108. /* 2GHz, GFSK */
  109. CDP_IEEE80211_MODE_FH = 4,
  110. /* 5GHz, OFDM, 2x clock dynamic turbo */
  111. CDP_IEEE80211_MODE_TURBO_A = 5,
  112. /* 2GHz, OFDM, 2x clock dynamic turbo */
  113. CDP_IEEE80211_MODE_TURBO_G = 6,
  114. /* 5Ghz, HT20 */
  115. CDP_IEEE80211_MODE_11NA_HT20 = 7,
  116. /* 2Ghz, HT20 */
  117. CDP_IEEE80211_MODE_11NG_HT20 = 8,
  118. /* 5Ghz, HT40 (ext ch +1) */
  119. CDP_IEEE80211_MODE_11NA_HT40PLUS = 9,
  120. /* 5Ghz, HT40 (ext ch -1) */
  121. CDP_IEEE80211_MODE_11NA_HT40MINUS = 10,
  122. /* 2Ghz, HT40 (ext ch +1) */
  123. CDP_IEEE80211_MODE_11NG_HT40PLUS = 11,
  124. /* 2Ghz, HT40 (ext ch -1) */
  125. CDP_IEEE80211_MODE_11NG_HT40MINUS = 12,
  126. /* 2Ghz, Auto HT40 */
  127. CDP_IEEE80211_MODE_11NG_HT40 = 13,
  128. /* 5Ghz, Auto HT40 */
  129. CDP_IEEE80211_MODE_11NA_HT40 = 14,
  130. /* 5Ghz, VHT20 */
  131. CDP_IEEE80211_MODE_11AC_VHT20 = 15,
  132. /* 5Ghz, VHT40 (Ext ch +1) */
  133. CDP_IEEE80211_MODE_11AC_VHT40PLUS = 16,
  134. /* 5Ghz VHT40 (Ext ch -1) */
  135. CDP_IEEE80211_MODE_11AC_VHT40MINUS = 17,
  136. /* 5Ghz, VHT40 */
  137. CDP_IEEE80211_MODE_11AC_VHT40 = 18,
  138. /* 5Ghz, VHT80 */
  139. CDP_IEEE80211_MODE_11AC_VHT80 = 19,
  140. /* 5Ghz, VHT160 */
  141. CDP_IEEE80211_MODE_11AC_VHT160 = 20,
  142. /* 5Ghz, VHT80_80 */
  143. CDP_IEEE80211_MODE_11AC_VHT80_80 = 21,
  144. };
  145. enum {
  146. CDP_PKT_TYPE_OFDM = 0,
  147. CDP_PKT_TYPE_CCK,
  148. CDP_PKT_TYPE_HT,
  149. CDP_PKT_TYPE_VHT,
  150. CDP_PKT_TYPE_HE,
  151. };
  152. enum {
  153. CDP_SGI_0_8_US = 0,
  154. CDP_SGI_0_4_US,
  155. CDP_SGI_1_6_US,
  156. CDP_SGI_3_2_US,
  157. };
  158. enum {
  159. CDP_RX_TYPE_SU = 0,
  160. CDP_RX_TYPE_MU_MIMO,
  161. CDP_RX_TYPE_MU_OFDMA,
  162. CDP_RX_TYPE_MU_OFDMA_MIMO,
  163. };
  164. /*
  165. *Band Width Types
  166. */
  167. enum CMN_BW_TYPES {
  168. CMN_BW_20MHZ,
  169. CMN_BW_40MHZ,
  170. CMN_BW_80MHZ,
  171. CMN_BW_160MHZ,
  172. CMN_BW_80_80MHZ,
  173. #ifdef WLAN_FEATURE_11BE
  174. CMN_BW_320MHZ,
  175. #endif
  176. CMN_BW_CNT,
  177. CMN_BW_IDLE = 0xFF, /*default BW state */
  178. };
  179. enum cdp_punctured_modes {
  180. NO_PUNCTURE,
  181. #ifdef WLAN_FEATURE_11BE
  182. PUNCTURED_20MHZ,
  183. PUNCTURED_40MHZ,
  184. PUNCTURED_80MHZ,
  185. PUNCTURED_120MHZ,
  186. #endif
  187. PUNCTURED_MODE_CNT,
  188. };
  189. struct cdp_mon_status {
  190. /* bss color value 1-63 used for update on ppdu_desc bsscolor */
  191. uint8_t bsscolor;
  192. int rs_numchains;
  193. int rs_flags;
  194. #define IEEE80211_RX_FCS_ERROR 0x01
  195. #define IEEE80211_RX_MIC_ERROR 0x02
  196. #define IEEE80211_RX_DECRYPT_ERROR 0x04
  197. /* holes in flags here between, ATH_RX_XXXX to IEEE80211_RX_XXX */
  198. #define IEEE80211_RX_KEYMISS 0x200
  199. #define IEEE80211_RX_PN_ERROR 0x400
  200. int rs_rssi; /* RSSI (noise floor ajusted) */
  201. int rs_abs_rssi; /* absolute RSSI */
  202. int rs_datarate; /* data rate received */
  203. int rs_rateieee;
  204. int rs_ratephy1;
  205. int rs_ratephy2;
  206. int rs_ratephy3;
  207. /* Keep the same as ATH_MAX_ANTENNA */
  208. #define IEEE80211_MAX_ANTENNA 3
  209. /* RSSI (noise floor ajusted) */
  210. u_int8_t rs_rssictl[IEEE80211_MAX_ANTENNA];
  211. /* RSSI (noise floor ajusted) */
  212. u_int8_t rs_rssiextn[IEEE80211_MAX_ANTENNA];
  213. /* rs_rssi is valid or not */
  214. u_int8_t rs_isvalidrssi;
  215. enum cdp_mon_phymode rs_phymode;
  216. int rs_freq;
  217. union {
  218. u_int8_t data[8];
  219. u_int64_t tsf;
  220. } rs_tstamp;
  221. /*
  222. * Detail channel structure of recv frame.
  223. * It could be NULL if not available
  224. */
  225. #ifdef ATH_SUPPORT_AOW
  226. u_int16_t rs_rxseq; /* WLAN Sequence number */
  227. #endif
  228. #ifdef ATH_VOW_EXT_STATS
  229. /* Lower 16 bits holds the udp checksum offset in the data pkt */
  230. u_int32_t vow_extstats_offset;
  231. /* Higher 16 bits contains offset in the data pkt at which vow
  232. * ext stats are embedded
  233. */
  234. #endif
  235. u_int8_t rs_isaggr;
  236. u_int8_t rs_isapsd;
  237. int16_t rs_noisefloor;
  238. u_int16_t rs_channel;
  239. #ifdef ATH_SUPPORT_TxBF
  240. u_int32_t rs_rpttstamp; /* txbf report time stamp*/
  241. #endif
  242. /* The following counts are meant to assist in stats calculation.
  243. * These variables are incremented only in specific situations, and
  244. * should not be relied upon for any purpose other than the original
  245. * stats related purpose they have been introduced for.
  246. */
  247. u_int16_t rs_cryptodecapcount; /* Crypto bytes decapped/demic'ed. */
  248. u_int8_t rs_padspace; /* No. of padding bytes present after
  249. header in wbuf. */
  250. u_int8_t rs_qosdecapcount; /* QoS/HTC bytes decapped. */
  251. /* End of stats calculation related counts. */
  252. /*
  253. * uint8_t rs_lsig[IEEE80211_LSIG_LEN];
  254. * uint8_t rs_htsig[IEEE80211_HTSIG_LEN];
  255. * uint8_t rs_servicebytes[IEEE80211_SB_LEN];
  256. * uint8_t rs_fcs_error;
  257. */
  258. /* cdp convergence monitor mode status */
  259. union {
  260. u_int8_t cdp_data[8];
  261. u_int64_t cdp_tsf;
  262. } cdp_rs_tstamp;
  263. uint8_t cdp_rs_pream_type;
  264. uint32_t cdp_rs_user_rssi;
  265. uint8_t cdp_rs_stbc;
  266. uint8_t cdp_rs_sgi;
  267. uint32_t cdf_rs_rate_mcs;
  268. uint32_t cdp_rs_reception_type;
  269. uint32_t cdp_rs_bw;
  270. uint32_t cdp_rs_nss;
  271. uint8_t cdp_rs_fcs_err;
  272. bool cdp_rs_rxdma_err;
  273. };
  274. enum {
  275. CDP_MON_PPDU_START = 0,
  276. CDP_MON_PPDU_END,
  277. };
  278. #ifdef QCA_UNDECODED_METADATA_SUPPORT
  279. /**
  280. * enum cdp_mon_phyrx_abort_reason_code: Phy err code to store the reason
  281. * why PHY generated an abort request.
  282. */
  283. enum cdp_mon_phyrx_abort_reason_code {
  284. CDP_PHYRX_ERR_PHY_OFF = 0,
  285. CDP_PHYRX_ERR_SYNTH_OFF,
  286. CDP_PHYRX_ERR_OFDMA_TIMING,
  287. CDP_PHYRX_ERR_OFDMA_SIGNAL_PARITY,
  288. CDP_PHYRX_ERR_OFDMA_RATE_ILLEGAL,
  289. CDP_PHYRX_ERR_OFDMA_LENGTH_ILLEGAL,
  290. CDP_PHYRX_ERR_OFDMA_RESTART,
  291. CDP_PHYRX_ERR_OFDMA_SERVICE,
  292. CDP_PHYRX_ERR_PPDU_OFDMA_POWER_DROP,
  293. CDP_PHYRX_ERR_CCK_BLOKKER,
  294. CDP_PHYRX_ERR_CCK_TIMING = 10,
  295. CDP_PHYRX_ERR_CCK_HEADER_CRC,
  296. CDP_PHYRX_ERR_CCK_RATE_ILLEGAL,
  297. CDP_PHYRX_ERR_CCK_LENGTH_ILLEGAL,
  298. CDP_PHYRX_ERR_CCK_RESTART,
  299. CDP_PHYRX_ERR_CCK_SERVICE,
  300. CDP_PHYRX_ERR_CCK_POWER_DROP,
  301. CDP_PHYRX_ERR_HT_CRC_ERR,
  302. CDP_PHYRX_ERR_HT_LENGTH_ILLEGAL,
  303. CDP_PHYRX_ERR_HT_RATE_ILLEGAL,
  304. CDP_PHYRX_ERR_HT_ZLF = 20,
  305. CDP_PHYRX_ERR_FALSE_RADAR_EXT,
  306. CDP_PHYRX_ERR_GREEN_FIELD,
  307. CDP_PHYRX_ERR_BW_GT_DYN_BW,
  308. CDP_PHYRX_ERR_HT_LSIG_RATE_MISMATCH,
  309. CDP_PHYRX_ERR_VHT_CRC_ERROR,
  310. CDP_PHYRX_ERR_VHT_SIGA_UNSUPPORTED,
  311. CDP_PHYRX_ERR_VHT_LSIG_LEN_INVALID,
  312. CDP_PHYRX_ERR_VHT_NDP_OR_ZLF,
  313. CDP_PHYRX_ERR_VHT_NSYM_LT_ZERO,
  314. CDP_PHYRX_ERR_VHT_RX_EXTRA_SYMBOL_MISMATCH = 30,
  315. CDP_PHYRX_ERR_VHT_RX_SKIP_GROUP_ID0,
  316. CDP_PHYRX_ERR_VHT_RX_SKIP_GROUP_ID1TO62,
  317. CDP_PHYRX_ERR_VHT_RX_SKIP_GROUP_ID63,
  318. CDP_PHYRX_ERR_OFDM_LDPC_DECODER_DISABLED,
  319. CDP_PHYRX_ERR_DEFER_NAP,
  320. CDP_PHYRX_ERR_FDOMAIN_TIMEOUT,
  321. CDP_PHYRX_ERR_LSIG_REL_CHECK,
  322. CDP_PHYRX_ERR_BT_COLLISION,
  323. CDP_PHYRX_ERR_UNSUPPORTED_MU_FEEDBACK,
  324. CDP_PHYRX_ERR_PPDU_TX_INTERRUPT_RX = 40,
  325. CDP_PHYRX_ERR_UNSUPPORTED_CBF,
  326. CDP_PHYRX_ERR_OTHER,
  327. CDP_PHYRX_ERR_HE_SIGA_UNSUPPORTED,
  328. CDP_PHYRX_ERR_HE_SIGA_CRC_ERROR,
  329. CDP_PHYRX_ERR_HE_SIGB_UNSUPPORTED,
  330. CDP_PHYRX_ERR_HE_SIGB_CRC_ERROR,
  331. CDP_PHYRX_ERR_HE_MU_MODE_UNSUPPORTED,
  332. CDP_PHYRX_ERR_HE_NDP_OR_ZLF,
  333. CDP_PHYRX_ERR_HE_NSYM_LT_ZERO,
  334. CDP_PHYRX_ERR_HE_RU_PARAMS_UNSUPPORTED = 50,
  335. CDP_PHYRX_ERR_HE_NUM_USERS_UNSUPPORTED,
  336. CDP_PHYRX_ERR_HE_SOUNDING_PARAMS_UNSUPPORTED,
  337. CDP_PHYRX_ERR_HE_EXT_SU_UNSUPPORTED,
  338. CDP_PHYRX_ERR_HE_TRIG_UNSUPPORTED,
  339. CDP_PHYRX_ERR_HE_LSIG_LEN_INVALID = 55,
  340. CDP_PHYRX_ERR_HE_LSIG_RATE_MISMATCH,
  341. CDP_PHYRX_ERR_OFDMA_SIGNAL_RELIABILITY,
  342. CDP_PHYRX_ERR_HT_NSYM_LT_ZERO,
  343. CDP_PHYRX_ERR_VHT_LSIG_RATE_MISMATCH,
  344. CDP_PHYRX_ERR_VHT_PAID_GID_MISMATCH = 60,
  345. CDP_PHYRX_ERR_VHT_UNSUPPORTED_BW,
  346. CDP_PHYRX_ERR_VHT_GI_DISAM_MISMATCH,
  347. CDP_PHYRX_ERR_RX_WDG_TIMEOUT = 63,
  348. CDP_PHYRX_ERR_MAX
  349. };
  350. #endif
  351. #define MAX_PPDU_ID_HIST 128
  352. /**
  353. * struct cdp_pdev_mon_stats
  354. * @status_ppdu_state: state on PPDU start and end
  355. * @status_ppdu_start: status ring PPDU start TLV count
  356. * @status_ppdu_end: status ring PPDU end TLV count
  357. * @status_ppdu_compl: status ring matching start and end count on PPDU
  358. * @status_ppdu_start_mis: status ring missing start TLV count on PPDU
  359. * @status_ppdu_end_mis: status ring missing end TLV count on PPDU
  360. * @status_ppdu_done: status ring PPDU done TLV count
  361. * @dest_ppdu_done: destination ring PPDU count
  362. * @dest_mpdu_done: destination ring MPDU count
  363. * @dup_mon_linkdesc_cnt: duplicate link descriptor indications from HW
  364. * @dup_mon_buf_cnt: duplicate buffer indications from HW
  365. * @tlv_tag_status_err: status not correct in the tlv tag
  366. * @status_buf_done_war: Number of status ring buffers for which DMA not done
  367. * WAR is applied.
  368. * @mon_rx_bufs_replenished_dest: Rx buffers replenish count
  369. * @mon_rx_bufs_reaped_dest: Rx buffer reap count
  370. * @ppdu_id_mismatch: counter to track ppdu id mismatch in
  371. * mointor status and monitor destination ring
  372. * @ppdu_id_match: counter to track ppdu id match in
  373. * mointor status and monitor destination ring
  374. * @status_ppdu_drop: Number of ppdu dropped from monitor status ring
  375. * @dest_ppdu_drop: Number of ppdu dropped from monitor destination ring
  376. * @mon_link_desc_invalid: msdu link desc invalid count
  377. * @mon_rx_desc_invalid: rx_desc invalid count
  378. * @rx_undecoded_count: Received undecoded frame count
  379. * @rx_undecoded_error: Rx undecoded errors
  380. */
  381. struct cdp_pdev_mon_stats {
  382. #ifndef REMOVE_MON_DBG_STATS
  383. uint32_t status_ppdu_state;
  384. uint32_t status_ppdu_start;
  385. uint32_t status_ppdu_end;
  386. uint32_t status_ppdu_compl;
  387. uint32_t status_ppdu_start_mis;
  388. uint32_t status_ppdu_end_mis;
  389. #endif
  390. uint32_t status_ppdu_done;
  391. uint32_t dest_ppdu_done;
  392. uint32_t dest_mpdu_done;
  393. uint32_t dest_mpdu_drop;
  394. uint32_t dup_mon_linkdesc_cnt;
  395. uint32_t dup_mon_buf_cnt;
  396. uint32_t stat_ring_ppdu_id_hist[MAX_PPDU_ID_HIST];
  397. uint32_t dest_ring_ppdu_id_hist[MAX_PPDU_ID_HIST];
  398. uint32_t ppdu_id_hist_idx;
  399. uint32_t mon_rx_dest_stuck;
  400. uint32_t tlv_tag_status_err;
  401. uint32_t status_buf_done_war;
  402. uint32_t mon_rx_bufs_replenished_dest;
  403. uint32_t mon_rx_bufs_reaped_dest;
  404. uint32_t ppdu_id_mismatch;
  405. uint32_t ppdu_id_match;
  406. uint32_t status_ppdu_drop;
  407. uint32_t dest_ppdu_drop;
  408. uint32_t mon_link_desc_invalid;
  409. uint32_t mon_rx_desc_invalid;
  410. uint32_t mon_nbuf_sanity_err;
  411. #ifdef QCA_UNDECODED_METADATA_SUPPORT
  412. uint32_t rx_undecoded_count;
  413. uint32_t rx_undecoded_error[CDP_PHYRX_ERR_MAX];
  414. #endif
  415. };
  416. #ifdef QCA_SUPPORT_LITE_MONITOR
  417. /**
  418. * cdp_lite_mon_filter_config - lite mon set/get filter config
  419. * @direction: direction tx/rx
  420. * @disable: disables lite mon
  421. * @level: MSDU/MPDU/PPDU levels
  422. * @metadata: meta information to be added
  423. * @mgmt_filter: mgmt filter for modes fp,md,mo
  424. * @ctrl_filter: ctrl filter for modes fp,md,mo
  425. * @data_filter: data filter for modes fp,md,mo
  426. * @len: mgmt/ctrl/data frame lens
  427. * @debug: debug options
  428. * @vdev_id: output vdev id
  429. */
  430. struct cdp_lite_mon_filter_config {
  431. uint8_t direction;
  432. uint8_t disable;
  433. uint8_t level;
  434. uint8_t metadata;
  435. uint16_t mgmt_filter[CDP_LITE_MON_MODE_MAX];
  436. uint16_t ctrl_filter[CDP_LITE_MON_MODE_MAX];
  437. uint16_t data_filter[CDP_LITE_MON_MODE_MAX];
  438. uint16_t len[CDP_LITE_MON_FRM_TYPE_MAX];
  439. uint8_t debug;
  440. uint8_t vdev_id;
  441. };
  442. /**
  443. * cdp_lite_mon_peer_config - lite mon set peer config
  444. * @direction: direction tx/rx
  445. * @action: add/del
  446. * @type: assoc/non-assoc
  447. * @vdev_id: peer vdev id
  448. * @mac: peer mac
  449. */
  450. struct cdp_lite_mon_peer_config {
  451. uint8_t direction;
  452. uint8_t action;
  453. uint8_t type;
  454. uint8_t vdev_id;
  455. uint8_t mac[QDF_MAC_ADDR_SIZE];
  456. };
  457. /**
  458. * cdp_lite_mon_peer_info - lite mon get peer config
  459. * @direction: direction tx/rx
  460. * @type: assoc/non-assoc
  461. * @count: no of peers
  462. * @mac: peer macs
  463. */
  464. struct cdp_lite_mon_peer_info {
  465. uint8_t direction;
  466. uint8_t type;
  467. uint8_t count;
  468. uint8_t mac[CDP_LITE_MON_PEER_MAX][QDF_MAC_ADDR_SIZE];
  469. };
  470. #endif
  471. /* channel operating width */
  472. enum cdp_channel_width {
  473. CHAN_WIDTH_20 = 0,
  474. CHAN_WIDTH_40,
  475. CHAN_WIDTH_80,
  476. CHAN_WIDTH_160,
  477. CHAN_WIDTH_80P80,
  478. CHAN_WIDTH_5,
  479. CHAN_WIDTH_10,
  480. CHAN_WIDTH_165,
  481. CHAN_WIDTH_160P160,
  482. CHAN_WIDTH_320,
  483. CHAN_WIDTH_MAX,
  484. };
  485. /* struct cdp_rssi_temp_off_param_dp
  486. * @rssi_temp_offset: Temperature based rssi offset , send every 30 secs
  487. */
  488. struct cdp_rssi_temp_off_param_dp {
  489. int32_t rssi_temp_offset;
  490. };
  491. /*
  492. * struct cdp_rssi_dbm_conv_param_dp
  493. * @curr_bw: Current bandwidth
  494. * @curr_rx_chainmask: Current rx chainmask
  495. * @xbar_config: 4 bytes, used for BB to RF Chain mapping
  496. * @xlna_bypass_offset: Low noise amplifier bypass offset
  497. * @xlna_bypass_threshold: Low noise amplifier bypass threshold
  498. * @nfHwDbm: HW noise floor in dBm per chain, per 20MHz subband
  499. */
  500. struct cdp_rssi_dbm_conv_param_dp {
  501. uint32_t curr_bw;
  502. uint32_t curr_rx_chainmask;
  503. uint32_t xbar_config;
  504. int32_t xlna_bypass_offset;
  505. int32_t xlna_bypass_threshold;
  506. int8_t nf_hw_dbm[CDP_MAX_NUM_ANTENNA][CDP_MAX_20MHZ_SEGS];
  507. };
  508. /*
  509. * struct cdp_rssi_db2dbm_param_dp
  510. * @pdev_id: pdev_id
  511. * @rssi_temp_off_present: to check temp offset values present or not
  512. * @rssi_dbm_info_present: to check rssi dbm converstion parameters
  513. * present or not
  514. * @temp_off_param: cdp_rssi_temp_off_param_dp structure value
  515. * @rssi_dbm_param: cdp_rssi_dbm_conv_param_dp staructure value
  516. */
  517. struct cdp_rssi_db2dbm_param_dp {
  518. uint32_t pdev_id;
  519. bool rssi_temp_off_present;
  520. bool rssi_dbm_info_present;
  521. struct cdp_rssi_temp_off_param_dp temp_off_param;
  522. struct cdp_rssi_dbm_conv_param_dp rssi_dbm_param;
  523. };
  524. #endif