1 /* 2 * Copyright (c) 2016-2018 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 19 /** 20 * @file cdp_txrx_stats_struct.h 21 * @brief Define the host data path stats API functions 22 * called by the host control SW and the OS interface module 23 */ 24 #ifndef _CDP_TXRX_STATS_STRUCT_H_ 25 #define _CDP_TXRX_STATS_STRUCT_H_ 26 #ifndef CONFIG_WIN 27 #include <wlan_defs.h> 28 #endif 29 30 #define TXRX_STATS_LEVEL_OFF 0 31 #define TXRX_STATS_LEVEL_BASIC 1 32 #define TXRX_STATS_LEVEL_FULL 2 33 34 #define BSS_CHAN_INFO_READ 1 35 #define BSS_CHAN_INFO_READ_AND_CLEAR 2 36 37 #define TX_FRAME_TYPE_DATA 0 38 #define TX_FRAME_TYPE_MGMT 1 39 #define TX_FRAME_TYPE_BEACON 2 40 41 #ifndef TXRX_STATS_LEVEL 42 #define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_BASIC 43 #endif 44 45 /* 1 additional MCS is for invalid values */ 46 #define MAX_MCS (12 + 1) 47 #define MAX_MCS_11A 8 48 #define MAX_MCS_11B 7 49 #define MAX_MCS_11AC 12 50 /* 1 additional GI is for invalid values */ 51 #define MAX_GI (4 + 1) 52 #define SS_COUNT 8 53 #define MAX_BW 7 54 #define MAX_RECEPTION_TYPES 4 55 56 /* WME stream classes */ 57 #define WME_AC_BE 0 /* best effort */ 58 #define WME_AC_BK 1 /* background */ 59 #define WME_AC_VI 2 /* video */ 60 #define WME_AC_VO 3 /* voice */ 61 #define WME_AC_MAX 4 /* MAX AC Value */ 62 63 #define CDP_MAX_RX_RINGS 4 64 65 /* 66 * Number of TLVs sent by FW. Needs to reflect 67 * HTT_PPDU_STATS_MAX_TAG declared in FW 68 */ 69 #define CDP_PPDU_STATS_MAX_TAG 14 70 71 /* Different Packet Types */ 72 enum cdp_packet_type { 73 DOT11_A = 0, 74 DOT11_B = 1, 75 DOT11_N = 2, 76 DOT11_AC = 3, 77 DOT11_AX = 4, 78 DOT11_MAX = 5, 79 }; 80 81 /* struct cdp_pkt_info - packet info 82 * @num: no of packets 83 * @bytes: total no of bytes 84 */ 85 struct cdp_pkt_info { 86 uint32_t num; 87 uint64_t bytes; 88 }; 89 90 /* struct cdp_pkt_type - packet type 91 * @mcs_count: Counter array for each MCS index 92 */ 93 struct cdp_pkt_type { 94 uint32_t mcs_count[MAX_MCS]; 95 }; 96 97 /* struct cdp_tx_stats - tx stats 98 * @cdp_pkt_info comp_pkt: Pkt Info for which completions were received 99 * @cdp_pkt_info ucast: Unicast Packet Count 100 * @cdp_pkt_info mcast: Multicast Packet Count 101 * @cdp_pkt_info bcast: Broadcast Packet Count 102 * @cdp_pkt_info nawds_mcast: NAWDS Multicast Packet Count 103 * @nawds_mcast_drop: NAWDS Multicast Drop Count 104 * @cdp_pkt_info tx_success: Successful Tx Packets 105 * @tx_failed: Total Tx failure 106 * @ofdma: Total Packets as ofdma 107 * @stbc: Packets in STBC 108 * @ldpc: Packets in LDPC 109 * @retries: Packet retries 110 * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation 111 * @amsdu_cnt: Number of MSDUs part of AMSDU 112 * @tx_rate: Tx Rate 113 * @last_tx_rate: Last tx rate 114 * @last_tx_rate_mcs: Tx rate mcs 115 * @last_per: Tx Per 116 * @rnd_avg_tx_rate: Rounded average tx rate 117 * @avg_tx_rate: Average TX rate 118 * @last_ack_rssi: RSSI of last acked packet 119 * @tx_bytes_success_last: last Tx success bytes 120 * @tx_data_success_last: last Tx success data 121 * @tx_byte_rate: Bytes Trasmitted in last one sec 122 * @tx_data_rate: Data Transmitted in last one sec 123 * @sgi_count[MAX_GI]: SGI count 124 * @nss[SS_COUNT]: Packet count for different num_spatial_stream values 125 * @bw[MAX_BW]: Packet Count for different bandwidths 126 * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count 127 * @excess_retries_per_ac[WME_AC_MAX]: Wireless Multimedia type Count 128 * @fw_rem: Discarded by firmware 129 * @fw_rem_notx: firmware_discard_untransmitted 130 * @fw_rem_tx: firmware_discard_transmitted 131 * @age_out: aged out in mpdu/msdu queues 132 * @fw_reason1: discarded by firmware reason 1 133 * @fw_reason2: discarded by firmware reason 2 134 * @fw_reason3: discarded by firmware reason 3 135 * @mcs_count: MCS Count 136 * @dot11_tx_pkts: dot11 tx packets 137 * @an_tx_cnt: ald tx count 138 * @an_tx_rates_used: ald rx rate used 139 * @an_tx_bytes: ald tx bytes 140 * @ald_txcount: ald tx count 141 * @ald_lastper: ald last PER 142 * @ald_max4msframelen: ald max frame len 143 * @an_tx_ratecount: ald tx ratecount 144 * @ald_retries: ald retries 145 * @ald_ac_nobufs: #buffer overflows per node per AC 146 * @ald_ac_excretries: #pkts dropped after excessive retries per node per AC 147 * @rssi_chain: rssi chain 148 * @inactive_time: inactive time in secs 149 * @tx_ratecode: Tx rate code of last frame 150 * @tx_flags: tx flags 151 * @tx_power: Tx power latest 152 * @is_tx_no_ack: no ack received 153 * @is_tx_nodefkey: tx failed 'cuz no defkey 154 * @is_tx_noheadroom: tx failed 'cuz no space 155 * @is_crypto_enmicfail: 156 * @is_tx_nonode: tx failed for no node 157 * @is_tx_unknownmgt: tx of unknown mgt frame 158 * @is_tx_badcipher: tx failed 'cuz key type 159 * @ampdu_cnt: completion of aggregation 160 * @non_ampdu_cnt: tx completion not aggregated 161 */ 162 struct cdp_tx_stats { 163 struct cdp_pkt_info comp_pkt; 164 struct cdp_pkt_info ucast; 165 struct cdp_pkt_info mcast; 166 struct cdp_pkt_info bcast; 167 struct cdp_pkt_info nawds_mcast; 168 uint32_t nawds_mcast_drop; 169 struct cdp_pkt_info tx_success; 170 uint32_t tx_failed; 171 uint32_t ofdma; 172 uint32_t stbc; 173 uint32_t ldpc; 174 uint32_t retries; 175 uint32_t non_amsdu_cnt; 176 uint32_t amsdu_cnt; 177 uint32_t tx_rate; 178 uint32_t last_tx_rate; 179 uint32_t last_tx_rate_mcs; 180 uint32_t last_per; 181 uint32_t rnd_avg_tx_rate; 182 uint32_t avg_tx_rate; 183 uint32_t last_ack_rssi; 184 uint32_t tx_bytes_success_last; 185 uint32_t tx_data_success_last; 186 uint32_t tx_byte_rate; 187 uint32_t tx_data_rate; 188 struct cdp_pkt_type pkt_type[DOT11_MAX]; 189 uint32_t sgi_count[MAX_GI]; 190 191 uint32_t nss[SS_COUNT]; 192 193 uint32_t bw[MAX_BW]; 194 195 uint32_t wme_ac_type[WME_AC_MAX]; 196 197 uint32_t excess_retries_per_ac[WME_AC_MAX]; 198 199 struct { 200 uint32_t fw_rem; 201 uint32_t fw_rem_notx; 202 uint32_t fw_rem_tx; 203 uint32_t age_out; 204 uint32_t fw_reason1; 205 uint32_t fw_reason2; 206 uint32_t fw_reason3; 207 } dropped; 208 209 struct cdp_pkt_info dot11_tx_pkts; 210 211 uint32_t fw_tx_cnt; 212 uint32_t fw_tx_rates_used; 213 uint32_t fw_tx_bytes; 214 uint32_t fw_txcount; 215 uint32_t fw_max4msframelen; 216 uint32_t fw_ratecount; 217 218 uint32_t ac_nobufs[WME_AC_MAX]; 219 uint32_t rssi_chain[WME_AC_MAX]; 220 uint32_t inactive_time; 221 222 uint32_t tx_ratecode; 223 uint32_t tx_flags; 224 uint32_t tx_power; 225 226 /* MSDUs which the target sent but couldn't get an ack for */ 227 struct cdp_pkt_info is_tx_no_ack; 228 229 /*add for peer and upadted from ppdu*/ 230 uint32_t ampdu_cnt; 231 uint32_t non_ampdu_cnt; 232 }; 233 234 /* struct cdp_rx_stats - rx Level Stats 235 * @to_stack: Total packets sent up the stack 236 * @rcvd_reo[CDP_MAX_RX_RINGS]: Packets received on the reo ring 237 * @unicast: Total unicast packets 238 * @multicast: Total multicast packets 239 * @bcast: Broadcast Packet Count 240 * @raw: Raw Pakets received 241 * @nawds_mcast_drop: Total multicast packets 242 * @pkts: Intra BSS packets received 243 * @fail: Intra BSS packets failed 244 * @mic_err: Rx MIC errors CCMP 245 * @decrypt_err: Rx Decryption Errors CRC 246 * @fcserr: rx MIC check failed (CCMP) 247 * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count 248 * @reception_type[MAX_RECEPTION_TYPES]: Reception type os packets 249 * @mcs_count[MAX_MCS]: mcs count 250 * @sgi_count[MAX_GI]: sgi count 251 * @nss[SS_COUNT]: Packet count in spatiel Streams 252 * @bw[MAX_BW]: Packet Count in different bandwidths 253 * @non_ampdu_cnt: Number of MSDUs with no MPDU level aggregation 254 * @ampdu_cnt: Number of MSDUs part of AMSPU 255 * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation 256 * @amsdu_cnt: Number of MSDUs part of AMSDU 257 * @bar_recv_cnt: Number of bar received 258 * @rssi: RSSI of received signal 259 * @last_rssi: Previous rssi 260 * @rx_rate: Rx rate 261 * @last_rx_rate: Previous rx rate 262 * @rnd_avg_rx_rate: Rounded average rx rate 263 * @avg_rx_rate: Average Rx rate 264 * @dot11_rx_pkts: dot11 rx packets 265 * @rx_bytes_last: last Rx success bytes 266 * @rx_data_last: last rx success data 267 * @rx_byte_rate: bytes received in last one sec 268 * @rx_data_rate: data received in last one sec 269 * @rx_retries: retries of packet in rx 270 * @rx_mpdus: mpdu in rx 271 * @rx_ppdus: ppdu in rx 272 * @is_rx_tooshort: tooshort 273 * @is_rx_decap: rx decap 274 * @rx_ccmpmic: rx MIC check failed (CCMP) 275 * @rx_tkipmic: rx MIC check failed (TKIP) 276 * @rx_tkipicv: rx ICV check failed (TKIP) 277 * @rx_wpimic: rx MIC check failed (WPI) 278 * @rx_wepfail: rx wep processing failed 279 * @rx_aggr: aggregation on rx 280 * @rx_discard: packets discard in rx 281 */ 282 struct cdp_rx_stats { 283 struct cdp_pkt_info to_stack; 284 struct cdp_pkt_info rcvd_reo[CDP_MAX_RX_RINGS]; 285 struct cdp_pkt_info unicast; 286 struct cdp_pkt_info multicast; 287 struct cdp_pkt_info bcast; 288 struct cdp_pkt_info raw; 289 uint32_t nawds_mcast_drop; 290 struct { 291 struct cdp_pkt_info pkts; 292 struct cdp_pkt_info fail; 293 } intra_bss; 294 295 struct { 296 uint32_t mic_err; 297 uint32_t decrypt_err; 298 uint32_t fcserr; 299 } err; 300 301 uint32_t wme_ac_type[WME_AC_MAX]; 302 uint32_t reception_type[MAX_RECEPTION_TYPES]; 303 struct cdp_pkt_type pkt_type[DOT11_MAX]; 304 uint32_t sgi_count[MAX_GI]; 305 uint32_t nss[SS_COUNT]; 306 uint32_t bw[MAX_BW]; 307 uint32_t non_ampdu_cnt; 308 uint32_t ampdu_cnt; 309 uint32_t non_amsdu_cnt; 310 uint32_t amsdu_cnt; 311 uint32_t bar_recv_cnt; 312 uint32_t rssi; 313 uint32_t last_rssi; 314 uint32_t rx_rate; 315 uint32_t last_rx_rate; 316 uint32_t rnd_avg_rx_rate; 317 uint32_t avg_rx_rate; 318 struct cdp_pkt_info dot11_rx_pkts; 319 320 uint32_t rx_bytes_success_last; 321 uint32_t rx_data_success_last; 322 uint32_t rx_byte_rate; 323 uint32_t rx_data_rate; 324 325 uint32_t rx_retries; 326 uint32_t rx_mpdus; 327 uint32_t rx_ppdus; 328 329 /*add for peer updated for ppdu*/ 330 uint32_t rx_aggr; 331 uint32_t rx_discard; 332 }; 333 334 /* struct cdp_tx_ingress_stats - Tx ingress Stats 335 * @rcvd: Total packets received for transmission 336 * @processed: Tx packets processed 337 * @inspect_pkts: Total packets passed to inspect handler 338 * @nawds_mcast: NAWDS Multicast Packet Count 339 * @bcast: Number of broadcast packets 340 * @raw_pkt: Total Raw packets 341 * @dma_map_error: DMA map error 342 * @num_seg: No of segments in TSO packets 343 * @tso_pkt:total no of TSO packets 344 * @non_tso_pkts: non - TSO packets 345 * @tso_desc_cnt: TSO descriptors 346 * @dropped_host: TSO packets dropped by host 347 * @dropped_target:TSO packets dropped by target 348 * @sg_pkt: Total scatter gather packets 349 * @non_sg_pkts: non SG packets 350 * @sg_desc_cnt: SG Descriptors 351 * @dropped_host: SG packets dropped by host 352 * @dropped_target: SG packets dropped by target 353 * @dma_map_error: Dma map error 354 * @mcast_pkt: total no of multicast conversion packets 355 * @dropped_map_error: packets dropped due to map error 356 * @dropped_self_mac: packets dropped due to self Mac address 357 * @dropped_send_fail: Packets dropped due to send fail 358 * @ucast: total unicast packets transmitted 359 * @fail_seg_alloc: Segment allocation failure 360 * @clone_fail: NBUF clone failure 361 * @dropped_pkt: Total scatter gather packets 362 * @desc_na: Desc Not Available 363 * @ring_full: ring full 364 * @enqueue_fail: hw enqueue fail 365 * @dma_error: dma fail 366 * @res_full: Resource Full: Congestion Control 367 * @exception_fw: packets sent to fw 368 * @completion_fw: packets completions received from fw 369 * @cce_classified:Number of packets classified by CCE 370 * @cce_classified_raw:Number of raw packets classified by CCE 371 */ 372 struct cdp_tx_ingress_stats { 373 struct cdp_pkt_info rcvd; 374 struct cdp_pkt_info processed; 375 struct cdp_pkt_info reinject_pkts; 376 struct cdp_pkt_info inspect_pkts; 377 struct cdp_pkt_info nawds_mcast; 378 struct cdp_pkt_info bcast; 379 380 struct { 381 struct cdp_pkt_info raw_pkt; 382 uint32_t dma_map_error; 383 } raw; 384 385 /* TSO packets info */ 386 struct { 387 uint32_t num_seg; 388 struct cdp_pkt_info tso_pkt; 389 struct cdp_pkt_info non_tso_pkts; 390 uint32_t tso_desc_cnt; 391 struct cdp_pkt_info dropped_host; 392 uint32_t dropped_target; 393 } tso; 394 395 /* Scatter Gather packet info */ 396 struct { 397 struct cdp_pkt_info sg_pkt; 398 struct cdp_pkt_info non_sg_pkts; 399 uint32_t sg_desc_cnt; 400 struct cdp_pkt_info dropped_host; 401 uint32_t dropped_target; 402 uint32_t dma_map_error; 403 } sg; 404 405 /* Multicast Enhancement packets info */ 406 struct { 407 struct cdp_pkt_info mcast_pkt; 408 uint32_t dropped_map_error; 409 uint32_t dropped_self_mac; 410 uint32_t dropped_send_fail; 411 uint32_t ucast; 412 uint32_t fail_seg_alloc; 413 uint32_t clone_fail; 414 } mcast_en; 415 416 /* Packets dropped on the Tx side */ 417 struct { 418 struct cdp_pkt_info dropped_pkt; 419 struct cdp_pkt_info desc_na; 420 uint32_t ring_full; 421 uint32_t enqueue_fail; 422 uint32_t dma_error; 423 uint32_t res_full; 424 } dropped; 425 426 /* Mesh packets info */ 427 struct { 428 uint32_t exception_fw; 429 uint32_t completion_fw; 430 } mesh; 431 432 uint32_t cce_classified; 433 uint32_t cce_classified_raw; 434 }; 435 436 /* struct cdp_vdev_stats - vdev stats structure 437 * @tx_i: ingress tx stats 438 * @tx: cdp tx stats 439 * @rx: cdp rx stats 440 */ 441 struct cdp_vdev_stats { 442 struct cdp_tx_ingress_stats tx_i; 443 struct cdp_tx_stats tx; 444 struct cdp_rx_stats rx; 445 }; 446 447 /* struct cdp_peer_stats - peer stats structure 448 * @tx: cdp tx stats 449 * @rx: cdp rx stats 450 */ 451 struct cdp_peer_stats { 452 /* CDP Tx Stats */ 453 struct cdp_tx_stats tx; 454 /* CDP Rx Stats */ 455 struct cdp_rx_stats rx; 456 }; 457 458 /* struct cdp_interface_peer_stats - interface structure for txrx peer stats 459 * @peer_hdl: control path peer handle 460 * @last_peer_tx_rate: peer tx rate for last transmission 461 * @peer_tx_rate: tx rate for current transmission 462 * @peer_rssi: current rssi value of peer 463 * @rssi_changed: denotes rssi is changed 464 * @tx_packet_count: tx packet count 465 * @rx_packet_count: rx packet count 466 * @tx_byte_count: tx byte count 467 * @rx_byte_count: rx byte count 468 * @per: per error rate 469 */ 470 struct cdp_interface_peer_stats { 471 void *peer_hdl; 472 uint32_t last_peer_tx_rate; 473 uint32_t peer_tx_rate; 474 uint32_t peer_rssi; 475 uint32_t tx_packet_count; 476 uint32_t rx_packet_count; 477 uint32_t tx_byte_count; 478 uint32_t rx_byte_count; 479 uint32_t per; 480 uint8_t rssi_changed; 481 }; 482 483 /* Tx completions per interrupt */ 484 struct cdp_hist_tx_comp { 485 uint32_t pkts_1; 486 uint32_t pkts_2_20; 487 uint32_t pkts_21_40; 488 uint32_t pkts_41_60; 489 uint32_t pkts_61_80; 490 uint32_t pkts_81_100; 491 uint32_t pkts_101_200; 492 uint32_t pkts_201_plus; 493 }; 494 495 /* Rx ring descriptors reaped per interrupt */ 496 struct cdp_hist_rx_ind { 497 uint32_t pkts_1; 498 uint32_t pkts_2_20; 499 uint32_t pkts_21_40; 500 uint32_t pkts_41_60; 501 uint32_t pkts_61_80; 502 uint32_t pkts_81_100; 503 uint32_t pkts_101_200; 504 uint32_t pkts_201_plus; 505 }; 506 507 struct cdp_htt_tlv_hdr { 508 /* BIT [11 : 0] :- tag 509 * BIT [23 : 12] :- length 510 * BIT [31 : 24] :- reserved 511 */ 512 uint32_t tag__length; 513 }; 514 515 #define HTT_STATS_SUBTYPE_MAX 16 516 517 struct cdp_htt_rx_pdev_fw_stats_tlv { 518 struct cdp_htt_tlv_hdr tlv_hdr; 519 520 /* BIT [ 7 : 0] :- mac_id 521 * BIT [31 : 8] :- reserved 522 */ 523 uint32_t mac_id__word; 524 /* Num PPDU status processed from HW */ 525 uint32_t ppdu_recvd; 526 /* Num MPDU across PPDUs with FCS ok */ 527 uint32_t mpdu_cnt_fcs_ok; 528 /* Num MPDU across PPDUs with FCS err */ 529 uint32_t mpdu_cnt_fcs_err; 530 /* Num MSDU across PPDUs */ 531 uint32_t tcp_msdu_cnt; 532 /* Num MSDU across PPDUs */ 533 uint32_t tcp_ack_msdu_cnt; 534 /* Num MSDU across PPDUs */ 535 uint32_t udp_msdu_cnt; 536 /* Num MSDU across PPDUs */ 537 uint32_t other_msdu_cnt; 538 /* Num MPDU on FW ring indicated */ 539 uint32_t fw_ring_mpdu_ind; 540 /* Num MGMT MPDU given to protocol */ 541 uint32_t fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX]; 542 /* Num ctrl MPDU given to protocol */ 543 uint32_t fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX]; 544 /* Num mcast data packet received */ 545 uint32_t fw_ring_mcast_data_msdu; 546 /* Num broadcast data packet received */ 547 uint32_t fw_ring_bcast_data_msdu; 548 /* Num unicat data packet received */ 549 uint32_t fw_ring_ucast_data_msdu; 550 /* Num null data packet received */ 551 uint32_t fw_ring_null_data_msdu; 552 /* Num MPDU on FW ring dropped */ 553 uint32_t fw_ring_mpdu_drop; 554 555 /* Num buf indication to offload */ 556 uint32_t ofld_local_data_ind_cnt; 557 /* Num buf recycle from offload */ 558 uint32_t ofld_local_data_buf_recycle_cnt; 559 /* Num buf indication to data_rx */ 560 uint32_t drx_local_data_ind_cnt; 561 /* Num buf recycle from data_rx */ 562 uint32_t drx_local_data_buf_recycle_cnt; 563 /* Num buf indication to protocol */ 564 uint32_t local_nondata_ind_cnt; 565 /* Num buf recycle from protocol */ 566 uint32_t local_nondata_buf_recycle_cnt; 567 568 /* Num buf fed */ 569 uint32_t fw_status_buf_ring_refill_cnt; 570 /* Num ring empty encountered */ 571 uint32_t fw_status_buf_ring_empty_cnt; 572 /* Num buf fed */ 573 uint32_t fw_pkt_buf_ring_refill_cnt; 574 /* Num ring empty encountered */ 575 uint32_t fw_pkt_buf_ring_empty_cnt; 576 /* Num buf fed */ 577 uint32_t fw_link_buf_ring_refill_cnt; 578 /* Num ring empty encountered */ 579 uint32_t fw_link_buf_ring_empty_cnt; 580 581 /* Num buf fed */ 582 uint32_t host_pkt_buf_ring_refill_cnt; 583 /* Num ring empty encountered */ 584 uint32_t host_pkt_buf_ring_empty_cnt; 585 /* Num buf fed */ 586 uint32_t mon_pkt_buf_ring_refill_cnt; 587 /* Num ring empty encountered */ 588 uint32_t mon_pkt_buf_ring_empty_cnt; 589 /* Num buf fed */ 590 uint32_t mon_status_buf_ring_refill_cnt; 591 /* Num ring empty encountered */ 592 uint32_t mon_status_buf_ring_empty_cnt; 593 /* Num buf fed */ 594 uint32_t mon_desc_buf_ring_refill_cnt; 595 /* Num ring empty encountered */ 596 uint32_t mon_desc_buf_ring_empty_cnt; 597 /* Num buf fed */ 598 uint32_t mon_dest_ring_update_cnt; 599 /* Num ring full encountered */ 600 uint32_t mon_dest_ring_full_cnt; 601 602 /* Num rx suspend is attempted */ 603 uint32_t rx_suspend_cnt; 604 /* Num rx suspend failed */ 605 uint32_t rx_suspend_fail_cnt; 606 /* Num rx resume attempted */ 607 uint32_t rx_resume_cnt; 608 /* Num rx resume failed */ 609 uint32_t rx_resume_fail_cnt; 610 /* Num rx ring switch */ 611 uint32_t rx_ring_switch_cnt; 612 /* Num rx ring restore */ 613 uint32_t rx_ring_restore_cnt; 614 /* Num rx flush issued */ 615 uint32_t rx_flush_cnt; 616 }; 617 618 /* == TX PDEV STATS == */ 619 struct cdp_htt_tx_pdev_stats_cmn_tlv { 620 struct cdp_htt_tlv_hdr tlv_hdr; 621 622 /* BIT [ 7 : 0] :- mac_id 623 * BIT [31 : 8] :- reserved 624 */ 625 uint32_t mac_id__word; 626 /* Num queued to HW */ 627 uint32_t hw_queued; 628 /* Num PPDU reaped from HW */ 629 uint32_t hw_reaped; 630 /* Num underruns */ 631 uint32_t underrun; 632 /* Num HW Paused counter. */ 633 uint32_t hw_paused; 634 /* Num HW flush counter. */ 635 uint32_t hw_flush; 636 /* Num HW filtered counter. */ 637 uint32_t hw_filt; 638 /* Num PPDUs cleaned up in TX abort */ 639 uint32_t tx_abort; 640 /* Num MPDUs requed by SW */ 641 uint32_t mpdu_requed; 642 /* excessive retries */ 643 uint32_t tx_xretry; 644 /* Last used data hw rate code */ 645 uint32_t data_rc; 646 /* frames dropped due to excessive sw retries */ 647 uint32_t mpdu_dropped_xretry; 648 /* illegal rate phy errors */ 649 uint32_t illgl_rate_phy_err; 650 /* wal pdev continuous xretry */ 651 uint32_t cont_xretry; 652 /* wal pdev continuous xretry */ 653 uint32_t tx_timeout; 654 /* wal pdev resets */ 655 uint32_t pdev_resets; 656 /* PhY/BB underrun */ 657 uint32_t phy_underrun; 658 /* MPDU is more than txop limit */ 659 uint32_t txop_ovf; 660 /* Number of Sequences posted */ 661 uint32_t seq_posted; 662 /* Number of Sequences failed queueing */ 663 uint32_t seq_failed_queueing; 664 /* Number of Sequences completed */ 665 uint32_t seq_completed; 666 /* Number of Sequences restarted */ 667 uint32_t seq_restarted; 668 /* Number of MU Sequences posted */ 669 uint32_t mu_seq_posted; 670 /* Number of time HW ring is paused between seq switch within ISR */ 671 uint32_t seq_switch_hw_paused; 672 /* Number of times seq continuation in DSR */ 673 uint32_t next_seq_posted_dsr; 674 /* Number of times seq continuation in ISR */ 675 uint32_t seq_posted_isr; 676 /* Number of seq_ctrl cached. */ 677 uint32_t seq_ctrl_cached; 678 /* Number of MPDUs successfully transmitted */ 679 uint32_t mpdu_count_tqm; 680 /* Number of MSDUs successfully transmitted */ 681 uint32_t msdu_count_tqm; 682 /* Number of MPDUs dropped */ 683 uint32_t mpdu_removed_tqm; 684 /* Number of MSDUs dropped */ 685 uint32_t msdu_removed_tqm; 686 /* Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */ 687 uint32_t mpdus_sw_flush; 688 /* Num MPDUs filtered by HW, all filter condition (TTL expired) */ 689 uint32_t mpdus_hw_filter; 690 /* Num MPDUs truncated by PDG (TXOP, TBTT, PPDU_duration based on rate, dyn_bw) */ 691 uint32_t mpdus_truncated; 692 /* Num MPDUs that was tried but didn't receive ACK or BA */ 693 uint32_t mpdus_ack_failed; 694 /* Num MPDUs that was dropped due to expiry (MSDU TTL). */ 695 uint32_t mpdus_expired; 696 /* Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */ 697 uint32_t mpdus_seq_hw_retry; 698 /* Num of TQM acked cmds processed */ 699 uint32_t ack_tlv_proc; 700 /* coex_abort_mpdu_cnt valid. */ 701 uint32_t coex_abort_mpdu_cnt_valid; 702 /* coex_abort_mpdu_cnt from TX FES stats. */ 703 uint32_t coex_abort_mpdu_cnt; 704 /* Number of total PPDUs(DATA, MGMT, excludes selfgen) tried over the air (OTA) */ 705 uint32_t num_total_ppdus_tried_ota; 706 /* Number of data PPDUs tried over the air (OTA) */ 707 uint32_t num_data_ppdus_tried_ota; 708 /* Num Local control/mgmt frames (MSDUs) queued */ 709 uint32_t local_ctrl_mgmt_enqued; 710 /* local_ctrl_mgmt_freed: 711 * Num Local control/mgmt frames (MSDUs) done 712 * It includes all local ctrl/mgmt completions 713 * (acked, no ack, flush, TTL, etc) 714 */ 715 uint32_t local_ctrl_mgmt_freed; 716 /* Num Local data frames (MSDUs) queued */ 717 uint32_t local_data_enqued; 718 /* local_data_freed: 719 * Num Local data frames (MSDUs) done 720 * It includes all local data completions 721 * (acked, no ack, flush, TTL, etc) 722 */ 723 uint32_t local_data_freed; 724 }; 725 726 struct cdp_htt_tx_pdev_stats_urrn_tlv_v { 727 struct cdp_htt_tlv_hdr tlv_hdr; 728 uint32_t urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */ 729 }; 730 731 /* NOTE: Variable length TLV, use length spec to infer array size */ 732 struct cdp_htt_tx_pdev_stats_flush_tlv_v { 733 struct cdp_htt_tlv_hdr tlv_hdr; 734 uint32_t flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */ 735 }; 736 737 /* NOTE: Variable length TLV, use length spec to infer array size */ 738 struct cdp_htt_tx_pdev_stats_sifs_tlv_v { 739 struct cdp_htt_tlv_hdr tlv_hdr; 740 uint32_t sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */ 741 }; 742 743 /* NOTE: Variable length TLV, use length spec to infer array size */ 744 struct cdp_htt_tx_pdev_stats_phy_err_tlv_v { 745 struct cdp_htt_tlv_hdr tlv_hdr; 746 uint32_t phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */ 747 }; 748 749 /* == RX PDEV/SOC STATS == */ 750 /* HTT_STATS_RX_SOC_FW_STATS_TAG */ 751 struct cdp_htt_rx_soc_fw_stats_tlv { 752 struct cdp_htt_tlv_hdr tlv_hdr; 753 /* Num Packets received on REO FW ring */ 754 uint32_t fw_reo_ring_data_msdu; 755 /* Num bc/mc packets indicated from fw to host */ 756 uint32_t fw_to_host_data_msdu_bcmc; 757 /* Num unicast packets indicated from fw to host */ 758 uint32_t fw_to_host_data_msdu_uc; 759 /* Num remote buf recycle from offload */ 760 uint32_t ofld_remote_data_buf_recycle_cnt; 761 /* Num remote free buf given to offload */ 762 uint32_t ofld_remote_free_buf_indication_cnt; 763 }; 764 765 struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v { 766 struct cdp_htt_tlv_hdr tlv_hdr; 767 /* Num total buf refilled from refill ring */ 768 uint32_t refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */ 769 }; 770 771 struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v { 772 struct cdp_htt_tlv_hdr tlv_hdr; 773 /* Num error MPDU for each RxDMA error type */ 774 uint32_t fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */ 775 }; 776 777 struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v { 778 struct cdp_htt_tlv_hdr tlv_hdr; 779 /* Num MPDU dropped */ 780 uint32_t fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */ 781 }; 782 783 #define HTT_STATS_PHY_ERR_MAX 43 784 785 struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv { 786 struct cdp_htt_tlv_hdr tlv_hdr; 787 788 /* BIT [ 7 : 0] :- mac_id 789 * BIT [31 : 8] :- reserved 790 */ 791 uint32_t mac_id__word; 792 /* Num of phy err */ 793 uint32_t total_phy_err_cnt; 794 /* Counts of different types of phy errs 795 * The mapping of PHY error types to phy_err array elements is HW dependent. 796 * The only currently-supported mapping is shown below: 797 * 798 * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV 799 * 1 phyrx_err_synth_off 800 * 2 phyrx_err_ofdma_timing 801 * 3 phyrx_err_ofdma_signal_parity 802 * 4 phyrx_err_ofdma_rate_illegal 803 * 5 phyrx_err_ofdma_length_illegal 804 * 6 phyrx_err_ofdma_restart 805 * 7 phyrx_err_ofdma_service 806 * 8 phyrx_err_ppdu_ofdma_power_drop 807 * 9 phyrx_err_cck_blokker 808 * 10 phyrx_err_cck_timing 809 * 11 phyrx_err_cck_header_crc 810 * 12 phyrx_err_cck_rate_illegal 811 * 13 phyrx_err_cck_length_illegal 812 * 14 phyrx_err_cck_restart 813 * 15 phyrx_err_cck_service 814 * 16 phyrx_err_cck_power_drop 815 * 17 phyrx_err_ht_crc_err 816 * 18 phyrx_err_ht_length_illegal 817 * 19 phyrx_err_ht_rate_illegal 818 * 20 phyrx_err_ht_zlf 819 * 21 phyrx_err_false_radar_ext 820 * 22 phyrx_err_green_field 821 * 23 phyrx_err_bw_gt_dyn_bw 822 * 24 phyrx_err_leg_ht_mismatch 823 * 25 phyrx_err_vht_crc_error 824 * 26 phyrx_err_vht_siga_unsupported 825 * 27 phyrx_err_vht_lsig_len_invalid 826 * 28 phyrx_err_vht_ndp_or_zlf 827 * 29 phyrx_err_vht_nsym_lt_zero 828 * 30 phyrx_err_vht_rx_extra_symbol_mismatch 829 * 31 phyrx_err_vht_rx_skip_group_id0 830 * 32 phyrx_err_vht_rx_skip_group_id1to62 831 * 33 phyrx_err_vht_rx_skip_group_id63 832 * 34 phyrx_err_ofdm_ldpc_decoder_disabled 833 * 35 phyrx_err_defer_nap 834 * 36 phyrx_err_fdomain_timeout 835 * 37 phyrx_err_lsig_rel_check 836 * 38 phyrx_err_bt_collision 837 * 39 phyrx_err_unsupported_mu_feedback 838 * 40 phyrx_err_ppdu_tx_interrupt_rx 839 * 41 phyrx_err_unsupported_cbf 840 * 42 phyrx_err_other 841 */ 842 uint32_t phy_err[HTT_STATS_PHY_ERR_MAX]; 843 }; 844 845 struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v { 846 struct cdp_htt_tlv_hdr tlv_hdr; 847 /* Num ring empty encountered */ 848 uint32_t refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */ 849 }; 850 851 struct cdp_htt_tx_pdev_stats { 852 struct cdp_htt_tx_pdev_stats_cmn_tlv cmn_tlv; 853 struct cdp_htt_tx_pdev_stats_urrn_tlv_v underrun_tlv; 854 struct cdp_htt_tx_pdev_stats_sifs_tlv_v sifs_tlv; 855 struct cdp_htt_tx_pdev_stats_flush_tlv_v flush_tlv; 856 struct cdp_htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv; 857 }; 858 859 struct cdp_htt_rx_soc_stats_t { 860 struct cdp_htt_rx_soc_fw_stats_tlv fw_tlv; 861 struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv; 862 struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv; 863 }; 864 865 struct cdp_htt_rx_pdev_stats { 866 struct cdp_htt_rx_soc_stats_t soc_stats; 867 struct cdp_htt_rx_pdev_fw_stats_tlv fw_stats_tlv; 868 struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv; 869 struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop; 870 struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv; 871 }; 872 873 /* struct cdp_pdev_stats - pdev stats 874 * @msdu_not_done: packets dropped because msdu done bit not set 875 * @mec:Multicast Echo check 876 * @mesh_filter: Mesh Filtered packets 877 * @mon_rx_drop: packets dropped on monitor vap 878 * @pkts: total packets replenished 879 * @rxdma_err: rxdma errors for replenished 880 * @nbuf_alloc_fail: nbuf alloc failed 881 * @map_err: Mapping failure 882 * @x86_fail: x86 failures 883 * @low_thresh_intrs: low threshold interrupts 884 * @rx_raw_pkts: Rx Raw Packets 885 * @mesh_mem_alloc: Mesh Rx Stats Alloc fail 886 * @desc_alloc_fail: desc alloc failed errors 887 * @ip_csum_err: ip checksum errors 888 * @tcp_udp_csum_err: tcp/udp checksum errors 889 * @buf_freelist: buffers added back in freelist 890 * @tx_i: Tx Ingress stats 891 * @tx:CDP Tx Stats 892 * @rx: CDP Rx Stats 893 * @tx_comp_histogram: Number of Tx completions per interrupt 894 * @rx_ind_histogram: Number of Rx ring descriptors reaped per interrupt 895 * @ppdu_stats_counter: ppdu stats counter 896 * @htt_tx_pdev_stats: htt pdev stats for tx 897 * @htt_rx_pdev_stats: htt pdev stats for rx 898 */ 899 struct cdp_pdev_stats { 900 struct { 901 uint32_t msdu_not_done; 902 uint32_t mec; 903 uint32_t mesh_filter; 904 uint32_t mon_rx_drop; 905 } dropped; 906 907 struct { 908 struct cdp_pkt_info pkts; 909 uint32_t rxdma_err; 910 uint32_t nbuf_alloc_fail; 911 uint32_t map_err; 912 uint32_t x86_fail; 913 uint32_t low_thresh_intrs; 914 } replenish; 915 916 uint32_t rx_raw_pkts; 917 uint32_t mesh_mem_alloc; 918 919 /* Rx errors */ 920 struct { 921 uint32_t desc_alloc_fail; 922 uint32_t ip_csum_err; 923 uint32_t tcp_udp_csum_err; 924 } err; 925 926 uint32_t buf_freelist; 927 struct cdp_tx_ingress_stats tx_i; 928 struct cdp_tx_stats tx; 929 struct cdp_rx_stats rx; 930 struct cdp_hist_tx_comp tx_comp_histogram; 931 struct cdp_hist_rx_ind rx_ind_histogram; 932 uint64_t ppdu_stats_counter[CDP_PPDU_STATS_MAX_TAG]; 933 934 struct cdp_htt_tx_pdev_stats htt_tx_pdev_stats; 935 struct cdp_htt_rx_pdev_stats htt_rx_pdev_stats; 936 }; 937 938 #ifndef BIG_ENDIAN_HOST 939 typedef struct { 940 uint64_t pkts; 941 uint64_t bytes; 942 } ol_txrx_stats_elem; 943 #else 944 struct ol_txrx_elem_t { 945 uint64_t pkts; 946 uint64_t bytes; 947 }; 948 typedef struct ol_txrx_elem_t ol_txrx_stats_elem; 949 #endif 950 951 #ifndef CONFIG_MCL 952 /** 953 * @brief data stats published by the host txrx layer 954 */ 955 struct ol_txrx_stats { 956 struct { 957 /* MSDUs received from the stack */ 958 ol_txrx_stats_elem from_stack; 959 /* MSDUs successfully sent across the WLAN */ 960 ol_txrx_stats_elem delivered; 961 struct { 962 /* MSDUs that the host did not accept */ 963 ol_txrx_stats_elem host_reject; 964 /* MSDUs which could not be downloaded to the target */ 965 ol_txrx_stats_elem download_fail; 966 /* 967 * MSDUs which the target discarded 968 * (lack of mem or old age) 969 */ 970 ol_txrx_stats_elem target_discard; 971 /* 972 * MSDUs which the target sent but couldn't get 973 * an ack for 974 */ 975 ol_txrx_stats_elem no_ack; 976 /* MSDUs dropped in NSS-FW */ 977 ol_txrx_stats_elem nss_ol_dropped; 978 } dropped; 979 u_int32_t desc_in_use; 980 u_int32_t desc_alloc_fails; 981 u_int32_t ce_ring_full; 982 u_int32_t dma_map_error; 983 /* MSDUs given to the txrx layer by the management stack */ 984 ol_txrx_stats_elem mgmt; 985 struct { 986 /* TSO applied jumbo packets received from NW Stack */ 987 ol_txrx_stats_elem tso_pkts; 988 /* Non - TSO packets */ 989 ol_txrx_stats_elem non_tso_pkts; 990 /* TSO packets : Dropped during TCP segmentation*/ 991 ol_txrx_stats_elem tso_dropped; 992 /* TSO Descriptors */ 993 u_int32_t tso_desc_cnt; 994 } tso; 995 996 struct { 997 /* TSO applied jumbo packets received from NW Stack */ 998 ol_txrx_stats_elem sg_pkts; 999 /* Non - TSO packets */ 1000 ol_txrx_stats_elem non_sg_pkts; 1001 /* TSO packets : Dropped during TCP segmentation*/ 1002 ol_txrx_stats_elem sg_dropped; 1003 /* TSO Descriptors */ 1004 u_int32_t sg_desc_cnt; 1005 } sg; 1006 struct { 1007 /* packets enqueued for flow control */ 1008 u_int32_t fl_ctrl_enqueue; 1009 /* packets discarded for flow control is full */ 1010 u_int32_t fl_ctrl_discard; 1011 /* packets sent to CE without flow control */ 1012 u_int32_t fl_ctrl_avoid; 1013 } fl_ctrl; 1014 } tx; 1015 struct { 1016 /* MSDUs given to the OS shim */ 1017 ol_txrx_stats_elem delivered; 1018 /* MSDUs forwarded from the rx path to the tx path */ 1019 ol_txrx_stats_elem forwarded; 1020 /* MSDUs in which ipv4 chksum error detected by HW */ 1021 ol_txrx_stats_elem ipv4_cksum_err; 1022 /* MSDUs in which tcp chksum error detected by HW */ 1023 ol_txrx_stats_elem tcp_ipv4_cksum_err; 1024 /* MSDUs in which udp chksum error detected by HW */ 1025 ol_txrx_stats_elem udp_ipv4_cksum_err; 1026 /* MSDUs in which tcp V6 chksum error detected by HW */ 1027 ol_txrx_stats_elem tcp_ipv6_cksum_err; 1028 /* MSDUs in which UDP V6 chksum error detected by HW */ 1029 ol_txrx_stats_elem udp_ipv6_cksum_err; 1030 } rx; 1031 struct { 1032 /* Number of mcast received for conversion */ 1033 u_int32_t num_me_rcvd; 1034 /* Number of unicast sent as part of mcast conversion */ 1035 u_int32_t num_me_ucast; 1036 /* Number of multicast frames dropped due to dma_map failure */ 1037 u_int32_t num_me_dropped_m; 1038 /* 1039 * Number of multicast frames dropped due to allocation 1040 * failure 1041 */ 1042 u_int32_t num_me_dropped_a; 1043 /* Number of multicast frames dropped due to internal failure */ 1044 u_int32_t num_me_dropped_i; 1045 /* Number of me buf currently in use */ 1046 u_int32_t num_me_buf; 1047 /* Number of me buf frames to self mac address */ 1048 u_int32_t num_me_dropped_s; 1049 /* Number of me buf in use in non pool based allocation*/ 1050 u_int32_t num_me_nonpool; 1051 /* Number of me buf allocated using non pool based allocation*/ 1052 u_int32_t num_me_nonpool_count; 1053 } mcast_enhance; 1054 }; 1055 1056 struct ol_ath_dbg_rx_rssi { 1057 uint8_t rx_rssi_pri20; 1058 uint8_t rx_rssi_sec20; 1059 uint8_t rx_rssi_sec40; 1060 uint8_t rx_rssi_sec80; 1061 }; 1062 1063 struct ol_ath_radiostats { 1064 uint64_t tx_beacon; 1065 uint32_t tx_buf_count; 1066 int32_t tx_mgmt; 1067 int32_t rx_mgmt; 1068 uint32_t rx_num_mgmt; 1069 uint32_t rx_num_ctl; 1070 uint32_t tx_rssi; 1071 uint32_t rx_rssi_comb; 1072 struct ol_ath_dbg_rx_rssi rx_rssi_chain0; 1073 struct ol_ath_dbg_rx_rssi rx_rssi_chain1; 1074 struct ol_ath_dbg_rx_rssi rx_rssi_chain2; 1075 struct ol_ath_dbg_rx_rssi rx_rssi_chain3; 1076 uint32_t rx_overrun; 1077 uint32_t rx_phyerr; 1078 uint32_t ackRcvBad; 1079 uint32_t rtsBad; 1080 uint32_t rtsGood; 1081 uint32_t fcsBad; 1082 uint32_t noBeacons; 1083 uint32_t mib_int_count; 1084 uint32_t rx_looplimit_start; 1085 uint32_t rx_looplimit_end; 1086 uint8_t ap_stats_tx_cal_enable; 1087 uint8_t self_bss_util; 1088 uint8_t obss_util; 1089 uint32_t tgt_asserts; 1090 int16_t chan_nf; 1091 int16_t chan_nf_sec80; 1092 uint64_t wmi_tx_mgmt; 1093 uint64_t wmi_tx_mgmt_completions; 1094 uint32_t wmi_tx_mgmt_completion_err; 1095 uint32_t peer_delete_req; 1096 uint32_t peer_delete_resp; 1097 uint32_t rx_mgmt_rssi_drop; 1098 uint32_t tx_frame_count; 1099 uint32_t rx_frame_count; 1100 uint32_t rx_clear_count; 1101 uint32_t cycle_count; 1102 uint32_t phy_err_count; 1103 uint32_t chan_tx_pwr; 1104 uint32_t be_nobuf; 1105 uint32_t tx_packets; 1106 uint32_t rx_packets; 1107 uint32_t tx_num_data; 1108 uint32_t rx_num_data; 1109 uint32_t tx_mcs[10]; 1110 uint32_t rx_mcs[10]; 1111 uint64_t rx_bytes; 1112 uint64_t tx_bytes; 1113 uint32_t tx_compaggr; 1114 uint32_t rx_aggr; 1115 uint32_t tx_bawadv; 1116 uint32_t tx_compunaggr; 1117 uint32_t rx_badcrypt; 1118 uint32_t rx_badmic; 1119 uint32_t rx_crcerr; 1120 uint32_t rx_last_msdu_unset_cnt; 1121 uint32_t rx_data_bytes; 1122 uint32_t tx_retries; 1123 }; 1124 1125 /* 1126 * Enumeration of PDEV Configuration parameter 1127 */ 1128 enum _ol_ath_param_t { 1129 OL_ATH_PARAM_TXCHAINMASK = 1, 1130 OL_ATH_PARAM_RXCHAINMASK = 2, 1131 OL_ATH_PARAM_AMPDU = 6, 1132 OL_ATH_PARAM_AMPDU_LIMIT = 7, 1133 OL_ATH_PARAM_AMPDU_SUBFRAMES = 8, 1134 OL_ATH_PARAM_TXPOWER_LIMIT2G = 12, 1135 OL_ATH_PARAM_TXPOWER_LIMIT5G = 13, 1136 OL_ATH_PARAM_LDPC = 32, 1137 OL_ATH_PARAM_VOW_EXT_STATS = 45, 1138 OL_ATH_PARAM_DYN_TX_CHAINMASK = 73, 1139 OL_ATH_PARAM_BURST_ENABLE = 77, 1140 OL_ATH_PARAM_BURST_DUR = 78, 1141 OL_ATH_PARAM_BCN_BURST = 80, 1142 OL_ATH_PARAM_DCS = 82, 1143 #if UMAC_SUPPORT_PERIODIC_PERFSTATS 1144 OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB = 83, 1145 OL_ATH_PARAM_PRDPERFSTAT_THRPUT_WIN = 84, 1146 OL_ATH_PARAM_PRDPERFSTAT_THRPUT = 85, 1147 OL_ATH_PARAM_PRDPERFSTAT_PER_ENAB = 86, 1148 OL_ATH_PARAM_PRDPERFSTAT_PER_WIN = 87, 1149 OL_ATH_PARAM_PRDPERFSTAT_PER = 88, 1150 #endif 1151 /* UMAC_SUPPORT_PERIODIC_PERFSTATS */ 1152 OL_ATH_PARAM_TOTAL_PER = 89, 1153 /* set manual rate for rts frame */ 1154 OL_ATH_PARAM_RTS_CTS_RATE = 92, 1155 /* co channel interference threshold level */ 1156 OL_ATH_PARAM_DCS_COCH_THR = 93, 1157 /* transmit error threshold */ 1158 OL_ATH_PARAM_DCS_TXERR_THR = 94, 1159 /* phy error threshold */ 1160 OL_ATH_PARAM_DCS_PHYERR_THR = 95, 1161 /* 1162 * The IOCTL number is 114, it is made 114, inorder to make the IOCTL 1163 * number same as Direct-attach IOCTL. 1164 * Please, don't change number. This IOCTL gets the Interface code path 1165 * it should be either DIRECT-ATTACH or OFF-LOAD. 1166 */ 1167 OL_ATH_PARAM_GET_IF_ID = 114, 1168 /* Enable Acs back Ground Channel selection Scan timer in AP mode*/ 1169 OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN = 118, 1170 /* ACS scan timer value in Seconds */ 1171 OL_ATH_PARAM_ACS_SCANTIME = 119, 1172 /* Negligence Delta RSSI between two channel */ 1173 OL_ATH_PARAM_ACS_RSSIVAR = 120, 1174 /* Negligence Delta Channel load between two channel*/ 1175 OL_ATH_PARAM_ACS_CHLOADVAR = 121, 1176 /* Enable Limited OBSS check */ 1177 OL_ATH_PARAM_ACS_LIMITEDOBSS = 122, 1178 /* Acs control flag for Scan timer */ 1179 OL_ATH_PARAM_ACS_CTRLFLAG = 123, 1180 /* Acs Run time Debug level*/ 1181 OL_ATH_PARAM_ACS_DEBUGTRACE = 124, 1182 OL_ATH_PARAM_SET_FW_HANG_ID = 137, 1183 /* Radio type 1:11ac 0:11abgn */ 1184 OL_ATH_PARAM_RADIO_TYPE = 138, 1185 OL_ATH_PARAM_IGMPMLD_OVERRIDE, /* IGMP/MLD packet override */ 1186 OL_ATH_PARAM_IGMPMLD_TID, /* IGMP/MLD packet TID no */ 1187 OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE, 1188 OL_ATH_PARAM_NON_AGG_SW_RETRY_TH, 1189 OL_ATH_PARAM_AGG_SW_RETRY_TH, 1190 /* Dont change this number it as per sync with DA 1191 Blocking certian channel from ic channel list */ 1192 OL_ATH_PARAM_DISABLE_DFS = 144, 1193 OL_ATH_PARAM_ENABLE_AMSDU = 145, 1194 OL_ATH_PARAM_ENABLE_AMPDU = 146, 1195 OL_ATH_PARAM_STA_KICKOUT_TH, 1196 OL_ATH_PARAM_WLAN_PROF_ENABLE, 1197 OL_ATH_PARAM_LTR_ENABLE, 1198 OL_ATH_PARAM_LTR_AC_LATENCY_BE = 150, 1199 OL_ATH_PARAM_LTR_AC_LATENCY_BK, 1200 OL_ATH_PARAM_LTR_AC_LATENCY_VI, 1201 OL_ATH_PARAM_LTR_AC_LATENCY_VO, 1202 OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT, 1203 OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT = 155, 1204 OL_ATH_PARAM_LTR_SLEEP_OVERRIDE, 1205 OL_ATH_PARAM_LTR_RX_OVERRIDE, 1206 OL_ATH_PARAM_L1SS_ENABLE, 1207 OL_ATH_PARAM_DSLEEP_ENABLE, 1208 /* radar error threshold */ 1209 OL_ATH_PARAM_DCS_RADAR_ERR_THR = 160, 1210 /* Tx channel utilization due to AP's tx and rx */ 1211 OL_ATH_PARAM_DCS_USERMAX_CU_THR, 1212 /* interference detection threshold */ 1213 OL_ATH_PARAM_DCS_INTR_DETECT_THR, 1214 /* sampling window, default 10secs */ 1215 OL_ATH_PARAM_DCS_SAMPLE_WINDOW, 1216 /* debug logs enable/disable */ 1217 OL_ATH_PARAM_DCS_DEBUG, 1218 OL_ATH_PARAM_ANI_ENABLE = 165, 1219 OL_ATH_PARAM_ANI_POLL_PERIOD, 1220 OL_ATH_PARAM_ANI_LISTEN_PERIOD, 1221 OL_ATH_PARAM_ANI_OFDM_LEVEL, 1222 OL_ATH_PARAM_ANI_CCK_LEVEL, 1223 OL_ATH_PARAM_DSCP_TID_MAP = 170, 1224 OL_ATH_PARAM_TXPOWER_SCALE, 1225 /* Phy error penalty */ 1226 OL_ATH_PARAM_DCS_PHYERR_PENALTY, 1227 #if ATH_SUPPORT_DSCP_OVERRIDE 1228 /* set/get TID for sending HMMC packets */ 1229 OL_ATH_PARAM_HMMC_DSCP_TID_MAP, 1230 /* set/get DSCP mapping override */ 1231 OL_ATH_PARAM_DSCP_OVERRIDE, 1232 /* set/get HMMC-DSCP mapping override */ 1233 OL_ATH_PARAM_HMMC_DSCP_OVERRIDE = 175, 1234 #endif 1235 #if ATH_RX_LOOPLIMIT_TIMER 1236 OL_ATH_PARAM_LOOPLIMIT_NUM, 1237 #endif 1238 OL_ATH_PARAM_ANTENNA_GAIN_2G, 1239 OL_ATH_PARAM_ANTENNA_GAIN_5G, 1240 OL_ATH_PARAM_RX_FILTER, 1241 #if ATH_SUPPORT_HYFI_ENHANCEMENTS 1242 OL_ATH_PARAM_BUFF_THRESH = 180, 1243 OL_ATH_PARAM_BLK_REPORT_FLOOD, 1244 OL_ATH_PARAM_DROP_STA_QUERY, 1245 #endif 1246 OL_ATH_PARAM_QBOOST, 1247 OL_ATH_PARAM_SIFS_FRMTYPE, 1248 OL_ATH_PARAM_SIFS_UAPSD = 185, 1249 OL_ATH_PARAM_FW_RECOVERY_ID, 1250 OL_ATH_PARAM_RESET_OL_STATS, 1251 OL_ATH_PARAM_AGGR_BURST, 1252 /* Number of deauth sent in consecutive rx_peer_invalid */ 1253 OL_ATH_PARAM_DEAUTH_COUNT, 1254 OL_ATH_PARAM_BLOCK_INTERBSS = 190, 1255 /* Firmware reset control for Bmiss / timeout / reset */ 1256 OL_ATH_PARAM_FW_DISABLE_RESET, 1257 OL_ATH_PARAM_MSDU_TTL, 1258 OL_ATH_PARAM_PPDU_DURATION, 1259 OL_ATH_PARAM_SET_TXBF_SND_PERIOD, 1260 OL_ATH_PARAM_ALLOW_PROMISC = 195, 1261 OL_ATH_PARAM_BURST_MODE, 1262 OL_ATH_PARAM_DYN_GROUPING, 1263 OL_ATH_PARAM_DPD_ENABLE, 1264 OL_ATH_PARAM_DBGLOG_RATELIM, 1265 /* firmware should intimate us about ps state change for node */ 1266 OL_ATH_PARAM_PS_STATE_CHANGE = 200, 1267 OL_ATH_PARAM_MCAST_BCAST_ECHO, 1268 /* OBSS RSSI threshold for 20/40 coexistence */ 1269 OL_ATH_PARAM_OBSS_RSSI_THRESHOLD, 1270 /* Link/node RX RSSI threshold for 20/40 coexistence */ 1271 OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD, 1272 #if ATH_CHANNEL_BLOCKING 1273 OL_ATH_PARAM_ACS_BLOCK_MODE = 205, 1274 #endif 1275 OL_ATH_PARAM_ACS_TX_POWER_OPTION, 1276 /* 1277 * Default Antenna Polarization MSB 8 bits (24:31) specifying 1278 * enable/disable ; LSB 24 bits (0:23) antenna mask value 1279 */ 1280 OL_ATH_PARAM_ANT_POLARIZATION, 1281 /* rate limit mute type error prints */ 1282 OL_ATH_PARAM_PRINT_RATE_LIMIT, 1283 OL_ATH_PARAM_PDEV_RESET, /* Reset FW PDEV*/ 1284 /* Do not crash host when target assert happened*/ 1285 OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH = 210, 1286 /* Consider OBSS non-erp to change to long slot*/ 1287 OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT = 211, 1288 OL_ATH_PARAM_STATS_FC, 1289 OL_ATH_PARAM_QFLUSHINTERVAL, 1290 OL_ATH_PARAM_TOTAL_Q_SIZE, 1291 OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0, 1292 OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1, 1293 OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2, 1294 OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3, 1295 OL_ATH_PARAM_MIN_THRESHOLD, 1296 OL_ATH_PARAM_MAX_Q_LIMIT, 1297 OL_ATH_PARAM_MIN_Q_LIMIT, 1298 OL_ATH_PARAM_CONG_CTRL_TIMER_INTV, 1299 OL_ATH_PARAM_STATS_TIMER_INTV, 1300 OL_ATH_PARAM_ROTTING_TIMER_INTV, 1301 OL_ATH_PARAM_LATENCY_PROFILE, 1302 OL_ATH_PARAM_HOSTQ_DUMP, 1303 OL_ATH_PARAM_TIDQ_MAP, 1304 OL_ATH_PARAM_DBG_ARP_SRC_ADDR, /* ARP DEBUG source address*/ 1305 OL_ATH_PARAM_DBG_ARP_DST_ADDR, /* ARP DEBUG destination address*/ 1306 OL_ATH_PARAM_ARP_DBG_CONF, /* ARP debug configuration */ 1307 OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, /* Disable AMSDU for station vap */ 1308 #if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS 1309 OL_ATH_PARAM_STADFS_ENABLE = 300, /* STA DFS is enabled or not */ 1310 #endif 1311 #if QCA_AIRTIME_FAIRNESS 1312 OL_ATH_PARAM_ATF_STRICT_SCHED = 301, 1313 OL_ATH_PARAM_ATF_GROUP_POLICY = 302, 1314 #endif 1315 #if DBDC_REPEATER_SUPPORT 1316 OL_ATH_PARAM_PRIMARY_RADIO, 1317 OL_ATH_PARAM_DBDC_ENABLE, 1318 #endif 1319 OL_ATH_PARAM_TXPOWER_DBSCALE, 1320 OL_ATH_PARAM_CTL_POWER_SCALE, 1321 #if QCA_AIRTIME_FAIRNESS 1322 OL_ATH_PARAM_ATF_OBSS_SCHED = 307, 1323 OL_ATH_PARAM_ATF_OBSS_SCALE = 308, 1324 #endif 1325 OL_ATH_PARAM_PHY_OFDM_ERR = 309, 1326 OL_ATH_PARAM_PHY_CCK_ERR = 310, 1327 OL_ATH_PARAM_FCS_ERR = 311, 1328 OL_ATH_PARAM_CHAN_UTIL = 312, 1329 #if DBDC_REPEATER_SUPPORT 1330 OL_ATH_PARAM_CLIENT_MCAST, 1331 #endif 1332 OL_ATH_PARAM_EMIWAR_80P80 = 314, 1333 OL_ATH_PARAM_BATCHMODE = 315, 1334 OL_ATH_PARAM_PACK_AGGR_DELAY = 316, 1335 #if UMAC_SUPPORT_ACFG 1336 OL_ATH_PARAM_DIAG_ENABLE = 317, 1337 #endif 1338 #if ATH_SUPPORT_VAP_QOS 1339 OL_ATH_PARAM_VAP_QOS = 318, 1340 #endif 1341 OL_ATH_PARAM_CHAN_STATS_TH = 319, 1342 /* Passive scan is enabled or disabled */ 1343 OL_ATH_PARAM_PASSIVE_SCAN_ENABLE = 320, 1344 OL_ATH_MIN_RSSI_ENABLE = 321, 1345 OL_ATH_MIN_RSSI = 322, 1346 OL_ATH_PARAM_ACS_2G_ALLCHAN = 323, 1347 #if DBDC_REPEATER_SUPPORT 1348 OL_ATH_PARAM_DELAY_STAVAP_UP = 324, 1349 #endif 1350 /* It is used to set the channel switch options */ 1351 OL_ATH_PARAM_CHANSWITCH_OPTIONS = 327, 1352 OL_ATH_BTCOEX_ENABLE = 328, 1353 OL_ATH_BTCOEX_WL_PRIORITY = 329, 1354 OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING = 330, 1355 OL_ATH_PARAM_CAL_VER_CHECK = 331, 1356 OL_ATH_PARAM_NO_VLAN = 332, 1357 OL_ATH_PARAM_CCA_THRESHOLD = 333, 1358 OL_ATH_PARAM_ATF_LOGGING = 334, 1359 OL_ATH_PARAM_STRICT_DOTH = 335, 1360 OL_ATH_PARAM_DISCONNECTION_TIMEOUT = 336, 1361 OL_ATH_PARAM_RECONFIGURATION_TIMEOUT = 337, 1362 OL_ATH_PARAM_CHANNEL_SWITCH_COUNT = 338, 1363 OL_ATH_PARAM_ALWAYS_PRIMARY = 339, 1364 OL_ATH_PARAM_FAST_LANE = 340, 1365 OL_ATH_GET_BTCOEX_DUTY_CYCLE = 341, 1366 OL_ATH_PARAM_SECONDARY_OFFSET_IE = 342, 1367 OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT = 343, 1368 OL_ATH_PARAM_PREFERRED_UPLINK = 344, 1369 OL_ATH_PARAM_PRECAC_ENABLE = 345, 1370 OL_ATH_PARAM_PRECAC_TIMEOUT = 346, 1371 OL_ATH_COEX_VER_CFG = 347, 1372 OL_ATH_PARAM_DUMP_TARGET = 348, 1373 OL_ATH_PARAM_PDEV_TO_REO_DEST = 349, 1374 OL_ATH_PARAM_DUMP_CHAINMASK_TABLES = 350, 1375 OL_ATH_PARAM_DUMP_OBJECTS = 351, 1376 OL_ATH_PARAM_ACS_SRLOADVAR = 352, 1377 OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353, 1378 OL_ATH_PARAM_EXT_NSS_CAPABLE = 354, 1379 OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355, 1380 OL_ATH_PARAM_TXACKTIMEOUT = 356, 1381 OL_ATH_PARAM_ICM_ACTIVE = 357, 1382 OL_ATH_PARAM_NOMINAL_NOISEFLOOR = 358, 1383 OL_ATH_PARAM_CHAN_INFO = 359, 1384 OL_ATH_PARAM_ACS_RANK = 360, 1385 OL_ATH_PARAM_TXCHAINSOFT = 361, 1386 OL_ATH_PARAM_WIDE_BAND_SCAN = 362, 1387 OL_ATH_PARAM_CCK_TX_ENABLE = 363, 1388 OL_ATH_PARAM_PAPI_ENABLE = 364, 1389 OL_ATH_PARAM_ISOLATION = 365, 1390 OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO = 366, 1391 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 1392 OL_ATH_PARAM_DFS_HOST_WAIT_TIMEOUT = 367, 1393 #endif 1394 OL_ATH_PARAM_NF_THRESH = 368, 1395 #ifdef OL_ATH_SMART_LOGGING 1396 OL_ATH_PARAM_SMARTLOG_ENABLE = 369, 1397 OL_ATH_PARAM_SMARTLOG_FATAL_EVENT = 370, 1398 OL_ATH_PARAM_SMARTLOG_SKB_SZ = 371, 1399 OL_ATH_PARAM_SMARTLOG_P1PINGFAIL = 372, 1400 #endif /* OL_ATH_SMART_LOGGING */ 1401 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT 1402 OL_ATH_PARAM_PRECAC_INTER_CHANNEL = 373, 1403 OL_ATH_PARAM_PRECAC_CHAN_STATE = 374, 1404 #endif 1405 OL_ATH_PARAM_DBR_RING_STATUS = 375, 1406 #ifdef QCN_ESP_IE 1407 OL_ATH_PARAM_ESP_PERIODICITY = 376, 1408 OL_ATH_PARAM_ESP_AIRTIME = 377, 1409 OL_ATH_PARAM_ESP_PPDU_DURATION = 378, 1410 OL_ATH_PARAM_ESP_BA_WINDOW = 379, 1411 #endif /* QCN_ESP_IE */ 1412 1413 OL_ATH_PARAM_CBS = 380, 1414 OL_ATH_PARAM_DCS_SIM = 381, 1415 OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME = 382, 1416 OL_ATH_PARAM_CBS_DWELL_REST_TIME = 383, 1417 OL_ATH_PARAM_CBS_WAIT_TIME = 384, 1418 OL_ATH_PARAM_CBS_REST_TIME = 385, 1419 OL_ATH_PARAM_CBS_CSA = 386, 1420 OL_ATH_PARAM_TWICE_ANTENNA_GAIN = 387, 1421 OL_ATH_PARAM_ACTIVITY_FACTOR = 388, 1422 }; 1423 1424 /* Enumeration of PDEV Configuration parameter */ 1425 enum _ol_hal_param_t { 1426 OL_HAL_CONFIG_DMA_BEACON_RESPONSE_TIME = 0 1427 }; 1428 #endif 1429 1430 /* Bitmasks for stats that can block */ 1431 #define EXT_TXRX_FW_STATS 0x0001 1432 #endif 1433