cdp_txrx_mon_struct.h 16 KB

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