Lines Matching refs:mon_pdev

63 	struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;  in dp_pdev_disable_mcopy_code()  local
65 mon_pdev->mcopy_mode = M_COPY_DISABLED; in dp_pdev_disable_mcopy_code()
66 mon_pdev->mvdev = NULL; in dp_pdev_disable_mcopy_code()
73 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_reset_mcopy_mode() local
76 if (mon_pdev->mcopy_mode) { in dp_reset_mcopy_mode()
88 mon_pdev->monitor_configured = false; in dp_reset_mcopy_mode()
96 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_config_mcopy_mode() local
100 if (mon_pdev->mvdev) in dp_config_mcopy_mode()
103 mon_pdev->mcopy_mode = val; in dp_config_mcopy_mode()
104 mon_pdev->tx_sniffer_enable = 0; in dp_config_mcopy_mode()
105 mon_pdev->monitor_configured = true; in dp_config_mcopy_mode()
130 if (!mon_pdev->pktlog_ppdu_stats) in dp_config_mcopy_mode()
155 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_reset_undecoded_metadata_capture() local
157 if (mon_pdev->undecoded_metadata_capture) { in dp_reset_undecoded_metadata_capture()
165 mon_pdev->undecoded_metadata_capture = 0; in dp_reset_undecoded_metadata_capture()
173 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_enable_undecoded_metadata_capture() local
175 if (!mon_pdev->mvdev) { in dp_enable_undecoded_metadata_capture()
180 mon_pdev->undecoded_metadata_capture = val; in dp_enable_undecoded_metadata_capture()
181 mon_pdev->monitor_configured = true; in dp_enable_undecoded_metadata_capture()
219 struct dp_mon_pdev *mon_pdev; in dp_reset_monitor_mode() local
224 mon_pdev = pdev->monitor_pdev; in dp_reset_monitor_mode()
225 qdf_spin_lock_bh(&mon_pdev->mon_lock); in dp_reset_monitor_mode()
228 qdf_spin_unlock_bh(&mon_pdev->mon_lock); in dp_reset_monitor_mode()
242 struct dp_mon_pdev *mon_pdev; in dp_reset_monitor_mode_unlock() local
248 mon_pdev = pdev->monitor_pdev; in dp_reset_monitor_mode_unlock()
254 mon_pdev->hold_mon_dest_ring = false; in dp_reset_monitor_mode_unlock()
255 mon_pdev->is_bkpressure = false; in dp_reset_monitor_mode_unlock()
256 mon_pdev->set_reset_mon = false; in dp_reset_monitor_mode_unlock()
258 if (mon_pdev->mon_desc) in dp_reset_monitor_mode_unlock()
259 qdf_mem_zero(mon_pdev->mon_desc, in dp_reset_monitor_mode_unlock()
268 if (mon_pdev->mcopy_mode) { in dp_reset_monitor_mode_unlock()
281 } else if (mon_pdev->undecoded_metadata_capture) { in dp_reset_monitor_mode_unlock()
294 mon_pdev->mvdev = NULL; in dp_reset_monitor_mode_unlock()
295 mon_pdev->monitor_configured = false; in dp_reset_monitor_mode_unlock()
314 struct dp_mon_pdev *mon_pdev; in dp_pdev_set_advance_monitor_filter() local
319 mon_pdev = pdev->monitor_pdev; in dp_pdev_set_advance_monitor_filter()
320 vdev = mon_pdev->mvdev; in dp_pdev_set_advance_monitor_filter()
330 if (!mon_pdev->mvdev) { in dp_pdev_set_advance_monitor_filter()
337 mon_pdev->mon_filter_mode = filter_val->mode; in dp_pdev_set_advance_monitor_filter()
338 mon_pdev->fp_mgmt_filter = filter_val->fp_mgmt; in dp_pdev_set_advance_monitor_filter()
339 mon_pdev->fp_ctrl_filter = filter_val->fp_ctrl; in dp_pdev_set_advance_monitor_filter()
340 mon_pdev->fp_data_filter = filter_val->fp_data; in dp_pdev_set_advance_monitor_filter()
341 mon_pdev->mo_mgmt_filter = filter_val->mo_mgmt; in dp_pdev_set_advance_monitor_filter()
342 mon_pdev->mo_ctrl_filter = filter_val->mo_ctrl; in dp_pdev_set_advance_monitor_filter()
343 mon_pdev->mo_data_filter = filter_val->mo_data; in dp_pdev_set_advance_monitor_filter()
418 struct dp_mon_pdev *mon_pdev; in dp_reset_scan_spcl_vap_stats() local
420 mon_pdev = vdev->pdev->monitor_pdev; in dp_reset_scan_spcl_vap_stats()
421 if (!mon_pdev || !mon_pdev->reset_scan_spcl_vap_stats_enable) in dp_reset_scan_spcl_vap_stats()
502 struct dp_mon_pdev *mon_pdev; in dp_vdev_set_monitor_mode() local
515 mon_pdev = pdev->monitor_pdev; in dp_vdev_set_monitor_mode()
517 mon_pdev->mvdev = vdev; in dp_vdev_set_monitor_mode()
536 if (mon_pdev->scan_spcl_vap_configured) in dp_vdev_set_monitor_mode()
540 if (mon_pdev->monitor_configured) { in dp_vdev_set_monitor_mode()
547 mon_pdev->monitor_configured = true; in dp_vdev_set_monitor_mode()
548 mon_pdev->phy_ppdu_id_size = hal_rx_get_phy_ppdu_id_size(soc->hal_soc); in dp_vdev_set_monitor_mode()
573 mon_pdev->monitor_configured = false; in dp_vdev_set_monitor_mode()
574 mon_pdev->mvdev = NULL; in dp_vdev_set_monitor_mode()
586 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_config_tx_capture_mode() local
588 mon_pdev->tx_sniffer_enable = 1; in dp_config_tx_capture_mode()
589 mon_pdev->monitor_configured = false; in dp_config_tx_capture_mode()
591 if (!mon_pdev->pktlog_ppdu_stats) in dp_config_tx_capture_mode()
613 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_config_debug_sniffer() local
623 mon_pdev->tx_sniffer_enable = 0; in dp_config_debug_sniffer()
624 mon_pdev->monitor_configured = false; in dp_config_debug_sniffer()
632 if (!mon_pdev->pktlog_ppdu_stats && in dp_config_debug_sniffer()
633 !mon_pdev->enhanced_stats_en && in dp_config_debug_sniffer()
634 !mon_pdev->bpr_enable) { in dp_config_debug_sniffer()
636 } else if (mon_pdev->enhanced_stats_en && in dp_config_debug_sniffer()
637 !mon_pdev->bpr_enable) { in dp_config_debug_sniffer()
641 } else if (!mon_pdev->enhanced_stats_en && in dp_config_debug_sniffer()
642 mon_pdev->bpr_enable) { in dp_config_debug_sniffer()
676 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_mon_config_undecoded_metadata_capture() local
678 if (!mon_pdev->mvdev && !mon_pdev->scan_spcl_vap_configured) { in dp_mon_config_undecoded_metadata_capture()
751 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_deliver_mgmt_frm() local
753 if (mon_pdev->tx_sniffer_enable || mon_pdev->mcopy_mode) { in dp_deliver_mgmt_frm()
758 if (!mon_pdev->bpr_enable) in dp_deliver_mgmt_frm()
767 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_htt_ppdu_stats_attach() local
769 mon_pdev->ppdu_tlv_buf = qdf_mem_malloc(HTT_T2H_MAX_MSG_SIZE); in dp_htt_ppdu_stats_attach()
771 if (!mon_pdev->ppdu_tlv_buf) { in dp_htt_ppdu_stats_attach()
782 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_htt_ppdu_stats_detach() local
785 TAILQ_FOREACH_SAFE(ppdu_info, &mon_pdev->ppdu_info_list, in dp_htt_ppdu_stats_detach()
789 TAILQ_REMOVE(&mon_pdev->ppdu_info_list, in dp_htt_ppdu_stats_detach()
791 mon_pdev->list_depth--; in dp_htt_ppdu_stats_detach()
797 TAILQ_FOREACH_SAFE(ppdu_info, &mon_pdev->sched_comp_ppdu_list, in dp_htt_ppdu_stats_detach()
801 TAILQ_REMOVE(&mon_pdev->sched_comp_ppdu_list, in dp_htt_ppdu_stats_detach()
803 mon_pdev->sched_comp_list_depth--; in dp_htt_ppdu_stats_detach()
809 if (mon_pdev->ppdu_tlv_buf) in dp_htt_ppdu_stats_detach()
810 qdf_mem_free(mon_pdev->ppdu_tlv_buf); in dp_htt_ppdu_stats_detach()
818 struct dp_mon_pdev *mon_pdev; in dp_pdev_get_rx_mon_stats() local
823 mon_pdev = pdev->monitor_pdev; in dp_pdev_get_rx_mon_stats()
824 if (!mon_pdev) in dp_pdev_get_rx_mon_stats()
827 qdf_mem_copy(stats, &mon_pdev->rx_mon_stats, in dp_pdev_get_rx_mon_stats()
843 dp_pdev_get_undecoded_capture_stats(struct dp_mon_pdev *mon_pdev, in dp_pdev_get_undecoded_capture_stats() argument
861 dp_pdev_get_undecoded_capture_stats(struct dp_mon_pdev *mon_pdev, in dp_pdev_get_undecoded_capture_stats() argument
1005 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_print_pdev_eht_ppdu_cnt() local
1008 rx_mon_stats = &mon_pdev->rx_mon_stats; in dp_print_pdev_eht_ppdu_cnt()
1021 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_print_pdev_mpdu_stats() local
1023 rx_mon_stats = &mon_pdev->rx_mon_stats; in dp_print_pdev_mpdu_stats()
1035 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_print_pdev_rx_mon_stats() local
1037 rx_mon_stats = &mon_pdev->rx_mon_stats; in dp_print_pdev_rx_mon_stats()
1099 qdf_spin_lock_bh(&mon_pdev->mon_lock); in dp_print_pdev_rx_mon_stats()
1107 qdf_spin_unlock_bh(&mon_pdev->mon_lock); in dp_print_pdev_rx_mon_stats()
1122 dp_pdev_get_undecoded_capture_stats(mon_pdev, rx_mon_stats); in dp_print_pdev_rx_mon_stats()
1148 struct dp_mon_pdev *mon_pdev, in dp_set_hybrid_pktlog_enable() argument
1158 if (mon_pdev->mvdev) in dp_set_hybrid_pktlog_enable()
1167 if (!mon_pdev->pktlog_hybrid_mode) { in dp_set_hybrid_pktlog_enable()
1168 mon_pdev->pktlog_hybrid_mode = true; in dp_set_hybrid_pktlog_enable()
1181 mon_pdev->rx_pktlog_mode = in dp_set_hybrid_pktlog_enable()
1193 dp_set_hybrid_pktlog_disable(struct dp_mon_pdev *mon_pdev) in dp_set_hybrid_pktlog_disable() argument
1195 mon_pdev->pktlog_hybrid_mode = false; in dp_set_hybrid_pktlog_disable()
1199 dp_set_hybrid_pktlog_disable(struct dp_mon_pdev *mon_pdev) in dp_set_hybrid_pktlog_disable() argument
1205 struct dp_mon_pdev *mon_pdev, in dp_set_hybrid_pktlog_enable() argument
1220 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_set_pktlog_wifi3() local
1240 if (mon_pdev->mvdev) in dp_set_pktlog_wifi3()
1243 if (mon_pdev->rx_pktlog_mode == DP_RX_PKTLOG_FULL) in dp_set_pktlog_wifi3()
1246 mon_pdev->rx_pktlog_mode = DP_RX_PKTLOG_FULL; in dp_set_pktlog_wifi3()
1252 mon_pdev->rx_pktlog_mode = in dp_set_pktlog_wifi3()
1265 if (mon_pdev->mvdev) in dp_set_pktlog_wifi3()
1268 if (mon_pdev->rx_pktlog_mode == DP_RX_PKTLOG_LITE) in dp_set_pktlog_wifi3()
1271 mon_pdev->rx_pktlog_mode = DP_RX_PKTLOG_LITE; in dp_set_pktlog_wifi3()
1281 mon_pdev->rx_pktlog_mode = in dp_set_pktlog_wifi3()
1294 mon_pdev->pktlog_ppdu_stats = true; in dp_set_pktlog_wifi3()
1305 if (mon_pdev->mvdev) in dp_set_pktlog_wifi3()
1308 if (mon_pdev->rx_pktlog_cbf) in dp_set_pktlog_wifi3()
1311 mon_pdev->rx_pktlog_cbf = true; in dp_set_pktlog_wifi3()
1312 mon_pdev->monitor_configured = true; in dp_set_pktlog_wifi3()
1326 mon_pdev->rx_pktlog_mode = in dp_set_pktlog_wifi3()
1328 mon_pdev->monitor_configured = false; in dp_set_pktlog_wifi3()
1336 if (!dp_set_hybrid_pktlog_enable(pdev, mon_pdev, soc)) in dp_set_pktlog_wifi3()
1351 if (mon_pdev->mvdev) in dp_set_pktlog_wifi3()
1354 if (mon_pdev->rx_pktlog_mode == DP_RX_PKTLOG_DISABLED) in dp_set_pktlog_wifi3()
1357 mon_pdev->rx_pktlog_mode = DP_RX_PKTLOG_DISABLED; in dp_set_pktlog_wifi3()
1386 mon_pdev->pktlog_ppdu_stats = false; in dp_set_pktlog_wifi3()
1387 if (!mon_pdev->enhanced_stats_en && in dp_set_pktlog_wifi3()
1388 !mon_pdev->tx_sniffer_enable && in dp_set_pktlog_wifi3()
1389 !mon_pdev->mcopy_mode) { in dp_set_pktlog_wifi3()
1392 } else if (mon_pdev->tx_sniffer_enable || in dp_set_pktlog_wifi3()
1393 mon_pdev->mcopy_mode) { in dp_set_pktlog_wifi3()
1397 } else if (mon_pdev->enhanced_stats_en) { in dp_set_pktlog_wifi3()
1406 mon_pdev->rx_pktlog_cbf = false; in dp_set_pktlog_wifi3()
1410 dp_set_hybrid_pktlog_disable(mon_pdev); in dp_set_pktlog_wifi3()
1428 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_pktlogmod_exit() local
1437 mon_pdev->pkt_log_init = false; in dp_pktlogmod_exit()
1548 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_rx_nac_filter() local
1555 qdf_spin_lock_bh(&mon_pdev->neighbour_peer_mutex); in dp_rx_nac_filter()
1556 TAILQ_FOREACH(peer, &mon_pdev->neighbour_peers_list, in dp_rx_nac_filter()
1569 qdf_spin_unlock_bh(&mon_pdev->neighbour_peer_mutex); in dp_rx_nac_filter()
1571 return mon_pdev->mvdev; in dp_rx_nac_filter()
1574 qdf_spin_unlock_bh(&mon_pdev->neighbour_peer_mutex); in dp_rx_nac_filter()
1583 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_filter_neighbour_peer() local
1585 if (mon_pdev->filter_neighbour_peers) { in dp_filter_neighbour_peer()
1618 struct dp_mon_pdev *mon_pdev; in dp_update_mon_mac_filter() local
1630 mon_pdev = pdev->monitor_pdev; in dp_update_mon_mac_filter()
1672 struct dp_mon_pdev *mon_pdev; in dp_pkt_log_init() local
1679 mon_pdev = handle->monitor_pdev; in dp_pkt_log_init()
1681 if (mon_pdev->pkt_log_init) { in dp_pkt_log_init()
1686 pktlog_sethandle(&mon_pdev->pl_dev, scn); in dp_pkt_log_init()
1687 pktlog_set_pdev_id(mon_pdev->pl_dev, pdev_id); in dp_pkt_log_init()
1693 mon_pdev->pkt_log_init = false; in dp_pkt_log_init()
1695 mon_pdev->pkt_log_init = true; in dp_pkt_log_init()
1751 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_neighbour_peers_detach() local
1753 TAILQ_FOREACH_SAFE(peer, &mon_pdev->neighbour_peers_list, in dp_neighbour_peers_detach()
1756 TAILQ_REMOVE(&mon_pdev->neighbour_peers_list, in dp_neighbour_peers_detach()
1761 qdf_spinlock_destroy(&mon_pdev->neighbour_peer_mutex); in dp_neighbour_peers_detach()
1793 struct dp_mon_pdev *mon_pdev; in dp_enable_enhanced_stats() local
1802 mon_pdev = pdev->monitor_pdev; in dp_enable_enhanced_stats()
1804 if (!mon_pdev) in dp_enable_enhanced_stats()
1807 if (mon_pdev->enhanced_stats_en == 0) in dp_enable_enhanced_stats()
1808 dp_cal_client_timer_start(mon_pdev->cal_client_ctx); in dp_enable_enhanced_stats()
1810 mon_pdev->enhanced_stats_en = 1; in dp_enable_enhanced_stats()
1820 dp_cal_client_timer_stop(mon_pdev->cal_client_ctx); in dp_enable_enhanced_stats()
1821 mon_pdev->enhanced_stats_en = 0; in dp_enable_enhanced_stats()
1868 struct dp_mon_pdev *mon_pdev; in dp_disable_enhanced_stats() local
1873 mon_pdev = pdev->monitor_pdev; in dp_disable_enhanced_stats()
1875 if (mon_pdev->enhanced_stats_en == 1) in dp_disable_enhanced_stats()
1876 dp_cal_client_timer_stop(mon_pdev->cal_client_ctx); in dp_disable_enhanced_stats()
1878 mon_pdev->enhanced_stats_en = 0; in dp_disable_enhanced_stats()
1953 struct dp_mon_pdev *mon_pdev; in dp_enable_peer_based_pktlog() local
1958 mon_pdev = pdev->monitor_pdev; in dp_enable_peer_based_pktlog()
1970 mon_pdev->dp_peer_based_pktlog = enb_dsb; in dp_enable_peer_based_pktlog()
2035 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_mcopy_check_deliver() local
2037 if (mon_pdev->mcopy_mode) { in dp_mcopy_check_deliver()
2038 if (mon_pdev->mcopy_mode == M_COPY) { in dp_mcopy_check_deliver()
2039 if ((mon_pdev->m_copy_id.tx_ppdu_id == ppdu_id) && in dp_mcopy_check_deliver()
2040 (mon_pdev->m_copy_id.tx_peer_id == peer_id)) { in dp_mcopy_check_deliver()
2048 mon_pdev->m_copy_id.tx_ppdu_id = ppdu_id; in dp_mcopy_check_deliver()
2049 mon_pdev->m_copy_id.tx_peer_id = peer_id; in dp_mcopy_check_deliver()
2396 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv() local
2398 if ((!mon_pdev->tx_sniffer_enable) && (!mon_pdev->mcopy_mode) && in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv()
2399 (!mon_pdev->bpr_enable) && (!mon_pdev->tx_capture_enabled)) in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv()
2409 trim_size = ((mon_pdev->mgmtctrl_frm_info.mgmt_buf + in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv()
2417 mon_pdev->mgmtctrl_frm_info.mgmt_buf_len); in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv()
2419 if (mon_pdev->tx_capture_enabled) { in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv()
2438 if (mon_pdev->bpr_enable) { in dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv()
4296 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_process_ppdu_stats_user_compltn_flush_tlv() local
4338 TAILQ_REMOVE(&mon_pdev->ppdu_info_list, ppdu_info, ppdu_info_list_elem); in dp_process_ppdu_stats_user_compltn_flush_tlv()
4339 mon_pdev->list_depth--; in dp_process_ppdu_stats_user_compltn_flush_tlv()
4340 TAILQ_INSERT_TAIL(&mon_pdev->sched_comp_ppdu_list, ppdu_info, in dp_process_ppdu_stats_user_compltn_flush_tlv()
4342 mon_pdev->sched_comp_list_depth++; in dp_process_ppdu_stats_user_compltn_flush_tlv()
4361 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_process_ppdu_stats_sch_cmd_status_tlv() local
4502 TAILQ_REMOVE(&mon_pdev->ppdu_info_list, ppdu_info, ppdu_info_list_elem); in dp_process_ppdu_stats_sch_cmd_status_tlv()
4503 mon_pdev->list_depth--; in dp_process_ppdu_stats_sch_cmd_status_tlv()
4504 TAILQ_INSERT_TAIL(&mon_pdev->sched_comp_ppdu_list, ppdu_info, in dp_process_ppdu_stats_sch_cmd_status_tlv()
4506 mon_pdev->sched_comp_list_depth++; in dp_process_ppdu_stats_sch_cmd_status_tlv()
4528 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_validate_fix_ppdu_tlv() local
4533 qdf_mem_zero(mon_pdev->ppdu_tlv_buf, tlv_expected_size); in dp_validate_fix_ppdu_tlv()
4534 qdf_mem_copy(mon_pdev->ppdu_tlv_buf, tag_buf, tlv_len); in dp_validate_fix_ppdu_tlv()
4535 tlv_desc = mon_pdev->ppdu_tlv_buf; in dp_validate_fix_ppdu_tlv()
4778 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_ppdu_desc_user_stats_update() local
4787 if (mon_pdev->tx_sniffer_enable || mon_pdev->mcopy_mode || in dp_ppdu_desc_user_stats_update()
4788 mon_pdev->tx_capture_enabled) { in dp_ppdu_desc_user_stats_update()
4914 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_ppdu_desc_deliver() local
4921 mon_pdev->last_sched_cmdid = ppdu_info->sched_cmdid; in dp_ppdu_desc_deliver()
4923 s_ppdu_info = TAILQ_FIRST(&mon_pdev->sched_comp_ppdu_list); in dp_ppdu_desc_deliver()
4925 TAILQ_FOREACH_SAFE(s_ppdu_info, &mon_pdev->sched_comp_ppdu_list, in dp_ppdu_desc_deliver()
4947 mon_pdev->delivered_sched_cmdid = s_ppdu_info->sched_cmdid; in dp_ppdu_desc_deliver()
4948 TAILQ_REMOVE(&mon_pdev->sched_comp_ppdu_list, s_ppdu_info, in dp_ppdu_desc_deliver()
4950 mon_pdev->sched_comp_list_depth--; in dp_ppdu_desc_deliver()
5031 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_get_ppdu_desc() local
5036 TAILQ_FOREACH_SAFE(ppdu_info, &mon_pdev->ppdu_info_list, in dp_get_ppdu_desc()
5046 TAILQ_REMOVE(&mon_pdev->ppdu_info_list, in dp_get_ppdu_desc()
5048 mon_pdev->list_depth--; in dp_get_ppdu_desc()
5079 &mon_pdev->sched_comp_ppdu_list, in dp_get_ppdu_desc()
5148 if (mon_pdev->list_depth > HTT_PPDU_DESC_MAX_DEPTH) { in dp_get_ppdu_desc()
5149 ppdu_info = TAILQ_FIRST(&mon_pdev->ppdu_info_list); in dp_get_ppdu_desc()
5150 TAILQ_REMOVE(&mon_pdev->ppdu_info_list, in dp_get_ppdu_desc()
5152 mon_pdev->list_depth--; in dp_get_ppdu_desc()
5195 TAILQ_INSERT_TAIL(&mon_pdev->ppdu_info_list, ppdu_info, in dp_get_ppdu_desc()
5197 mon_pdev->list_depth++; in dp_get_ppdu_desc()
5232 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_htt_process_tlv() local
5264 mon_pdev->mgmtctrl_frm_info.mgmt_buf = tlv_buf; in dp_htt_process_tlv()
5265 mon_pdev->mgmtctrl_frm_info.ppdu_id = ppdu_id; in dp_htt_process_tlv()
5266 mon_pdev->mgmtctrl_frm_info.mgmt_buf_len = in dp_htt_process_tlv()
5301 mon_pdev->tlv_count++; in dp_htt_process_tlv()
5302 ppdu_info->last_tlv_cnt = mon_pdev->tlv_count; in dp_htt_process_tlv()
5310 mon_pdev->last_ppdu_id = ppdu_id; in dp_htt_process_tlv()
5314 if (mon_pdev->tx_sniffer_enable || mon_pdev->mcopy_mode || in dp_htt_process_tlv()
5315 mon_pdev->tx_capture_enabled) { in dp_htt_process_tlv()
5461 struct dp_mon_pdev *mon_pdev; in dp_txrx_ppdu_stats_handler() local
5470 mon_pdev = pdev->monitor_pdev; in dp_txrx_ppdu_stats_handler()
5471 if (!mon_pdev) in dp_txrx_ppdu_stats_handler()
5477 qdf_spin_lock_bh(&mon_pdev->ppdu_stats_lock); in dp_txrx_ppdu_stats_handler()
5480 if (mon_pdev->mgmtctrl_frm_info.mgmt_buf) { in dp_txrx_ppdu_stats_handler()
5482 (pdev, htt_t2h_msg, mon_pdev->mgmtctrl_frm_info.ppdu_id) != in dp_txrx_ppdu_stats_handler()
5490 mon_pdev->mgmtctrl_frm_info.mgmt_buf = NULL; in dp_txrx_ppdu_stats_handler()
5491 mon_pdev->mgmtctrl_frm_info.mgmt_buf_len = 0; in dp_txrx_ppdu_stats_handler()
5492 mon_pdev->mgmtctrl_frm_info.ppdu_id = 0; in dp_txrx_ppdu_stats_handler()
5494 qdf_spin_unlock_bh(&mon_pdev->ppdu_stats_lock); in dp_txrx_ppdu_stats_handler()
5551 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_pdev_get_filter_ucast_data() local
5553 if ((mon_pdev->fp_data_filter & FILTER_DATA_UCAST) || in dp_pdev_get_filter_ucast_data()
5554 (mon_pdev->mo_data_filter & FILTER_DATA_UCAST)) in dp_pdev_get_filter_ucast_data()
5563 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_pdev_get_filter_mcast_data() local
5565 if ((mon_pdev->fp_data_filter & FILTER_DATA_MCAST) || in dp_pdev_get_filter_mcast_data()
5566 (mon_pdev->mo_data_filter & FILTER_DATA_MCAST)) in dp_pdev_get_filter_mcast_data()
5575 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_pdev_get_filter_non_data() local
5577 if ((mon_pdev->fp_mgmt_filter & FILTER_MGMT_ALL) || in dp_pdev_get_filter_non_data()
5578 (mon_pdev->mo_mgmt_filter & FILTER_MGMT_ALL)) { in dp_pdev_get_filter_non_data()
5579 if ((mon_pdev->fp_ctrl_filter & FILTER_CTRL_ALL) || in dp_pdev_get_filter_non_data()
5580 (mon_pdev->mo_ctrl_filter & FILTER_CTRL_ALL)) { in dp_pdev_get_filter_non_data()
5663 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_mon_pdev_per_target_config() local
5673 mon_pdev->is_tlv_hdr_64_bit = true; in dp_mon_pdev_per_target_config()
5674 mon_pdev->tlv_hdr_size = HAL_RX_TLV64_HDR_SIZE; in dp_mon_pdev_per_target_config()
5678 mon_pdev->is_tlv_hdr_64_bit = false; in dp_mon_pdev_per_target_config()
5679 mon_pdev->tlv_hdr_size = HAL_RX_TLV32_HDR_SIZE; in dp_mon_pdev_per_target_config()
5787 struct dp_mon_pdev *mon_pdev; in dp_mon_pdev_attach() local
5799 mon_pdev = dp_context_alloc_mem(soc, DP_MON_PDEV_TYPE, mon_pdev_context_size); in dp_mon_pdev_attach()
5800 if (!mon_pdev) { in dp_mon_pdev_attach()
5805 pdev->monitor_pdev = mon_pdev; in dp_mon_pdev_attach()
5838 pdev->monitor_pdev = mon_pdev; in dp_mon_pdev_attach()
5852 dp_context_free_mem(soc, DP_MON_PDEV_TYPE, mon_pdev); in dp_mon_pdev_attach()
5859 struct dp_mon_pdev *mon_pdev; in dp_mon_pdev_detach() local
5867 mon_pdev = pdev->monitor_pdev; in dp_mon_pdev_detach()
5868 if (!mon_pdev) { in dp_mon_pdev_detach()
5887 dp_context_free_mem(pdev->soc, DP_MON_PDEV_TYPE, mon_pdev); in dp_mon_pdev_detach()
6008 struct dp_mon_pdev *mon_pdev; in dp_mon_pdev_init() local
6016 mon_pdev = pdev->monitor_pdev; in dp_mon_pdev_init()
6018 mon_pdev->invalid_mon_peer = qdf_mem_malloc(sizeof(struct dp_mon_peer)); in dp_mon_pdev_init()
6019 if (!mon_pdev->invalid_mon_peer) { in dp_mon_pdev_init()
6031 mon_pdev->filter = dp_mon_filter_alloc(mon_pdev); in dp_mon_pdev_init()
6032 if (!mon_pdev->filter) { in dp_mon_pdev_init()
6046 qdf_spinlock_create(&mon_pdev->ppdu_stats_lock); in dp_mon_pdev_init()
6047 qdf_spinlock_create(&mon_pdev->neighbour_peer_mutex); in dp_mon_pdev_init()
6048 mon_pdev->monitor_configured = false; in dp_mon_pdev_init()
6049 mon_pdev->mon_chan_band = REG_BAND_UNKNOWN; in dp_mon_pdev_init()
6051 TAILQ_INIT(&mon_pdev->neighbour_peers_list); in dp_mon_pdev_init()
6052 mon_pdev->neighbour_peers_added = false; in dp_mon_pdev_init()
6053 mon_pdev->monitor_configured = false; in dp_mon_pdev_init()
6055 dp_mon_pdev_filter_init(mon_pdev); in dp_mon_pdev_init()
6059 TAILQ_INIT(&mon_pdev->ppdu_info_list); in dp_mon_pdev_init()
6060 TAILQ_INIT(&mon_pdev->sched_comp_ppdu_list); in dp_mon_pdev_init()
6062 mon_pdev->list_depth = 0; in dp_mon_pdev_init()
6063 mon_pdev->tlv_count = 0; in dp_mon_pdev_init()
6065 dp_cal_client_attach(&mon_pdev->cal_client_ctx, in dp_mon_pdev_init()
6106 mon_pdev->is_dp_mon_pdev_initialized = true; in dp_mon_pdev_init()
6107 dp_mon_set_local_pkt_capture_running(mon_pdev, false); in dp_mon_pdev_init()
6122 qdf_spinlock_destroy(&mon_pdev->neighbour_peer_mutex); in dp_mon_pdev_init()
6123 qdf_spinlock_destroy(&mon_pdev->ppdu_stats_lock); in dp_mon_pdev_init()
6127 dp_mon_filter_dealloc(mon_pdev); in dp_mon_pdev_init()
6129 qdf_mem_free(mon_pdev->invalid_mon_peer); in dp_mon_pdev_init()
6135 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; in dp_mon_pdev_deinit() local
6144 if (!mon_pdev->is_dp_mon_pdev_initialized) in dp_mon_pdev_deinit()
6167 dp_cal_client_detach(&mon_pdev->cal_client_ctx); in dp_mon_pdev_deinit()
6169 qdf_spinlock_destroy(&mon_pdev->ppdu_stats_lock); in dp_mon_pdev_deinit()
6174 if (mon_pdev->filter) in dp_mon_pdev_deinit()
6175 dp_mon_filter_dealloc(mon_pdev); in dp_mon_pdev_deinit()
6176 if (mon_pdev->invalid_mon_peer) in dp_mon_pdev_deinit()
6177 qdf_mem_free(mon_pdev->invalid_mon_peer); in dp_mon_pdev_deinit()
6178 mon_pdev->is_dp_mon_pdev_initialized = false; in dp_mon_pdev_deinit()
6179 dp_mon_set_local_pkt_capture_running(mon_pdev, false); in dp_mon_pdev_deinit()
6789 struct dp_mon_pdev *mon_pdev; in dp_mon_pdev_params_rssi_dbm_conv() local
6804 mon_pdev = pdev->monitor_pdev; in dp_mon_pdev_params_rssi_dbm_conv()
6805 mon_pdev->rssi_dbm_conv_support = in dp_mon_pdev_params_rssi_dbm_conv()
6810 mon_pdev->rssi_offsets.rssi_temp_offset = in dp_mon_pdev_params_rssi_dbm_conv()
6824 mon_pdev->rssi_offsets.xlna_bypass_offset = in dp_mon_pdev_params_rssi_dbm_conv()
6826 mon_pdev->rssi_offsets.xlna_bypass_threshold = in dp_mon_pdev_params_rssi_dbm_conv()
6828 mon_pdev->rssi_offsets.xbar_config = conv_params.xbar_config; in dp_mon_pdev_params_rssi_dbm_conv()
6829 mon_pdev->rssi_offsets.min_nf_dbm = min_nf; in dp_mon_pdev_params_rssi_dbm_conv()
6830 mon_pdev->rssi_offsets.rssi_offset = in dp_mon_pdev_params_rssi_dbm_conv()
6831 mon_pdev->rssi_offsets.min_nf_dbm + in dp_mon_pdev_params_rssi_dbm_conv()
6832 mon_pdev->rssi_offsets.rssi_temp_offset; in dp_mon_pdev_params_rssi_dbm_conv()
6997 static void print_ring_tracker_stats(struct dp_mon_pdev *mon_pdev, in print_ring_tracker_stats() argument
7004 tracker = mon_pdev->hist_ppdu_id_mon_s; in print_ring_tracker_stats()
7006 tracker = mon_pdev->hist_ppdu_id_mon_d; in print_ring_tracker_stats()
7028 static void print_ring_tracker_stats(struct dp_mon_pdev *mon_pdev, in print_ring_tracker_stats() argument
7039 struct dp_mon_pdev *mon_pdev; in dp_check_and_dump_full_mon_info() local
7067 mon_pdev = pdev->monitor_pdev; in dp_check_and_dump_full_mon_info()
7068 if (!mon_pdev) { in dp_check_and_dump_full_mon_info()
7076 qdf_spin_lock_bh(&mon_pdev->mon_lock); in dp_check_and_dump_full_mon_info()
7088 "hold_mon_dest_ring: %d\n", mon_pdev->hold_mon_dest_ring); in dp_check_and_dump_full_mon_info()
7090 "mon_pdev last_ppdu_id: %d\n", mon_pdev->last_ppdu_id); in dp_check_and_dump_full_mon_info()
7098 mon_pdev->reap_status[DP_MON_STATUS_NO_DMA]); in dp_check_and_dump_full_mon_info()
7101 mon_pdev->reap_status[DP_MON_STATUS_MATCH]); in dp_check_and_dump_full_mon_info()
7104 mon_pdev->reap_status[DP_MON_STATUS_LAG]); in dp_check_and_dump_full_mon_info()
7107 mon_pdev->reap_status[DP_MON_STATUS_LEAD]); in dp_check_and_dump_full_mon_info()
7110 mon_pdev->reap_status[DP_MON_STATUS_REPLENISH]); in dp_check_and_dump_full_mon_info()
7116 mon_pdev->prev_status[DP_MON_STATUS_NO_DMA]); in dp_check_and_dump_full_mon_info()
7119 mon_pdev->prev_status[DP_MON_STATUS_MATCH]); in dp_check_and_dump_full_mon_info()
7122 mon_pdev->prev_status[DP_MON_STATUS_LAG]); in dp_check_and_dump_full_mon_info()
7125 mon_pdev->prev_status[DP_MON_STATUS_LEAD]); in dp_check_and_dump_full_mon_info()
7128 mon_pdev->prev_status[DP_MON_STATUS_REPLENISH]); in dp_check_and_dump_full_mon_info()
7134 mon_pdev->status_match[DP_MON_STATUS_LAG]); in dp_check_and_dump_full_mon_info()
7137 mon_pdev->status_match[DP_MON_STATUS_LEAD]); in dp_check_and_dump_full_mon_info()
7141 mon_pdev->rx_mon_stats.ppdu_id_mismatch); in dp_check_and_dump_full_mon_info()
7144 mon_pdev->rx_mon_stats.status_ppdu_drop); in dp_check_and_dump_full_mon_info()
7147 mon_pdev->rx_mon_stats.dest_ppdu_drop); in dp_check_and_dump_full_mon_info()
7150 mon_pdev->rx_mon_stats.tlv_tag_status_err); in dp_check_and_dump_full_mon_info()
7153 mon_pdev->rx_mon_stats.status_buf_done_war); in dp_check_and_dump_full_mon_info()
7161 print_ring_tracker_stats(mon_pdev, 0); in dp_check_and_dump_full_mon_info()
7165 print_ring_tracker_stats(mon_pdev, 1); in dp_check_and_dump_full_mon_info()
7231 qdf_spin_unlock_bh(&mon_pdev->mon_lock); in dp_check_and_dump_full_mon_info()