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