Lines Matching full:debug

15 #include "debug.h"
53 ath10k_info(ar, "kconfig debug %d debugfs %d tracing %d dfs %d testmode %d\n", in ath10k_debug_print_hwfw_info()
245 ar->debug.fw_stats_done = false; in ath10k_debug_fw_stats_reset()
246 ar->debug.fw_stats.extended = false; in ath10k_debug_fw_stats_reset()
247 ath10k_fw_stats_pdevs_free(&ar->debug.fw_stats.pdevs); in ath10k_debug_fw_stats_reset()
248 ath10k_fw_stats_vdevs_free(&ar->debug.fw_stats.vdevs); in ath10k_debug_fw_stats_reset()
249 ath10k_fw_stats_peers_free(&ar->debug.fw_stats.peers); in ath10k_debug_fw_stats_reset()
250 ath10k_fw_extd_stats_peers_free(&ar->debug.fw_stats.peers_extd); in ath10k_debug_fw_stats_reset()
288 if (ar->debug.fw_stats_done) { in ath10k_debug_fw_stats_process()
295 num_peers = ath10k_wmi_fw_stats_num_peers(&ar->debug.fw_stats.peers); in ath10k_debug_fw_stats_process()
296 num_vdevs = ath10k_wmi_fw_stats_num_vdevs(&ar->debug.fw_stats.vdevs); in ath10k_debug_fw_stats_process()
297 is_start = (list_empty(&ar->debug.fw_stats.pdevs) && in ath10k_debug_fw_stats_process()
299 is_end = (!list_empty(&ar->debug.fw_stats.pdevs) && in ath10k_debug_fw_stats_process()
303 list_splice_tail_init(&stats.pdevs, &ar->debug.fw_stats.pdevs); in ath10k_debug_fw_stats_process()
306 ar->debug.fw_stats_done = true; in ath10k_debug_fw_stats_process()
309 ar->debug.fw_stats.extended = true; in ath10k_debug_fw_stats_process()
311 is_started = !list_empty(&ar->debug.fw_stats.pdevs); in ath10k_debug_fw_stats_process()
318 ath10k_fw_stats_peers_free(&ar->debug.fw_stats.peers); in ath10k_debug_fw_stats_process()
319 ath10k_fw_extd_stats_peers_free(&ar->debug.fw_stats.peers_extd); in ath10k_debug_fw_stats_process()
325 ath10k_fw_stats_vdevs_free(&ar->debug.fw_stats.vdevs); in ath10k_debug_fw_stats_process()
332 &ar->debug.fw_stats.peers_extd); in ath10k_debug_fw_stats_process()
334 list_splice_tail_init(&stats.peers, &ar->debug.fw_stats.peers); in ath10k_debug_fw_stats_process()
335 list_splice_tail_init(&stats.vdevs, &ar->debug.fw_stats.vdevs); in ath10k_debug_fw_stats_process()
338 complete(&ar->debug.fw_stats_complete); in ath10k_debug_fw_stats_process()
367 reinit_completion(&ar->debug.fw_stats_complete); in ath10k_debug_fw_stats_request()
376 wait_for_completion_timeout(&ar->debug.fw_stats_complete, in ath10k_debug_fw_stats_request()
382 if (ar->debug.fw_stats_done) { in ath10k_debug_fw_stats_request()
417 ret = ath10k_wmi_fw_stats_fill(ar, &ar->debug.fw_stats, buf); in ath10k_fw_stats_open()
642 reg_addr = ar->debug.reg_addr; in ath10k_reg_addr_read()
666 ar->debug.reg_addr = reg_addr; in ath10k_reg_addr_write()
698 reg_addr = ar->debug.reg_addr; in ath10k_reg_value_read()
727 reg_addr = ar->debug.reg_addr; in ath10k_reg_value_write()
869 if (ar->debug.htt_stats_mask == 0) in ath10k_debug_htt_stats_req()
878 ret = ath10k_htt_h2t_stats_req(&ar->htt, ar->debug.htt_stats_mask, in ath10k_debug_htt_stats_req()
879 ar->debug.reset_htt_stats, cookie); in ath10k_debug_htt_stats_req()
885 queue_delayed_work(ar->workqueue, &ar->debug.htt_stats_dwork, in ath10k_debug_htt_stats_req()
894 debug.htt_stats_dwork.work); in ath10k_debug_htt_stats_dwork()
911 len = scnprintf(buf, sizeof(buf), "%lu\n", ar->debug.htt_stats_mask); in ath10k_read_htt_stats_mask()
934 ar->debug.htt_stats_mask = mask; in ath10k_write_htt_stats_mask()
1027 ar->debug.fw_dbglog_mask, ar->debug.fw_dbglog_level); in ath10k_read_fw_dbglog()
1058 ar->debug.fw_dbglog_mask = mask; in ath10k_write_fw_dbglog()
1059 ar->debug.fw_dbglog_level = log_level; in ath10k_write_fw_dbglog()
1062 ret = ath10k_wmi_dbglog_cfg(ar, ar->debug.fw_dbglog_mask, in ath10k_write_fw_dbglog()
1063 ar->debug.fw_dbglog_level); in ath10k_write_fw_dbglog()
1176 pdev_stats = list_first_entry_or_null(&ar->debug.fw_stats.pdevs, in ath10k_debug_get_et_stats()
1272 ret = ath10k_hif_diag_read(ar, le32_to_cpu(addr), ar->debug.cal_data, in ath10k_debug_cal_data_fetch()
1308 ar->debug.cal_data, in ath10k_debug_cal_data_read()
1385 len = scnprintf(buf, sizeof(buf), "%d\n", ar->debug.nf_cal_period); in ath10k_read_nf_cal_period()
1411 ar->debug.nf_cal_period = period; in ath10k_write_nf_cal_period()
1420 ar->debug.nf_cal_period); in ath10k_write_nf_cal_period()
1452 reinit_completion(&ar->debug.tpc_complete); in ath10k_debug_tpc_stats_request()
1460 time_left = wait_for_completion_timeout(&ar->debug.tpc_complete, in ath10k_debug_tpc_stats_request()
1473 kfree(ar->debug.tpc_stats); in ath10k_debug_tpc_stats_process()
1474 ar->debug.tpc_stats = tpc_stats; in ath10k_debug_tpc_stats_process()
1475 complete(&ar->debug.tpc_complete); in ath10k_debug_tpc_stats_process()
1486 kfree(ar->debug.tpc_stats_final); in ath10k_debug_tpc_stats_final_process()
1487 ar->debug.tpc_stats_final = tpc_stats; in ath10k_debug_tpc_stats_final_process()
1488 complete(&ar->debug.tpc_complete); in ath10k_debug_tpc_stats_final_process()
1653 ath10k_tpc_stats_fill(ar, ar->debug.tpc_stats, buf); in ath10k_tpc_stats_open()
1703 if (ar->debug.fw_dbglog_mask) { in ath10k_debug_start()
1704 ret = ath10k_wmi_dbglog_cfg(ar, ar->debug.fw_dbglog_mask, in ath10k_debug_start()
1727 if (ar->debug.nf_cal_period && in ath10k_debug_start()
1732 ar->debug.nf_cal_period); in ath10k_debug_start()
1735 ath10k_warn(ar, "cal period cfg failed from debug start: %d\n", in ath10k_debug_start()
1754 if (ar->debug.htt_stats_mask != 0) in ath10k_debug_stop()
1755 cancel_delayed_work(&ar->debug.htt_stats_dwork); in ath10k_debug_stop()
1789 ar->debug.dfs_stats.p))
1793 ar->debug.dfs_pool_stats.p))
1812 ar->debug.dfs_pool_stats = in ath10k_read_dfs_stats()
2059 ar->debug.enable_extd_tx_stats = filter; in ath10k_write_enable_extd_tx_stats()
2064 if (filter == ar->debug.enable_extd_tx_stats) { in ath10k_write_enable_extd_tx_stats()
2069 ar->debug.enable_extd_tx_stats = filter; in ath10k_write_enable_extd_tx_stats()
2088 ar->debug.enable_extd_tx_stats); in ath10k_read_enable_extd_tx_stats()
2273 reinit_completion(&ar->debug.tpc_complete); in ath10k_debug_tpc_stats_final_request()
2281 time_left = wait_for_completion_timeout(&ar->debug.tpc_complete, in ath10k_debug_tpc_stats_final_request()
2315 ath10k_tpc_stats_fill(ar, ar->debug.tpc_stats, buf); in ath10k_tpc_stats_final_open()
2494 ar->debug.reset_htt_stats = reset; in ath10k_write_reset_htt_stats()
2500 ar->debug.reset_htt_stats = 0; in ath10k_write_reset_htt_stats()
2517 ar->debug.cal_data = vzalloc(ATH10K_DEBUG_CAL_DATA_LEN); in ath10k_debug_create()
2518 if (!ar->debug.cal_data) in ath10k_debug_create()
2521 INIT_LIST_HEAD(&ar->debug.fw_stats.pdevs); in ath10k_debug_create()
2522 INIT_LIST_HEAD(&ar->debug.fw_stats.vdevs); in ath10k_debug_create()
2523 INIT_LIST_HEAD(&ar->debug.fw_stats.peers); in ath10k_debug_create()
2524 INIT_LIST_HEAD(&ar->debug.fw_stats.peers_extd); in ath10k_debug_create()
2531 vfree(ar->debug.cal_data); in ath10k_debug_destroy()
2532 ar->debug.cal_data = NULL; in ath10k_debug_destroy()
2536 kfree(ar->debug.tpc_stats); in ath10k_debug_destroy()
2537 kfree(ar->debug.tpc_stats_final); in ath10k_debug_destroy()
2542 ar->debug.debugfs_phy = debugfs_create_dir("ath10k", in ath10k_debug_register()
2544 if (IS_ERR_OR_NULL(ar->debug.debugfs_phy)) { in ath10k_debug_register()
2545 if (IS_ERR(ar->debug.debugfs_phy)) in ath10k_debug_register()
2546 return PTR_ERR(ar->debug.debugfs_phy); in ath10k_debug_register()
2551 INIT_DELAYED_WORK(&ar->debug.htt_stats_dwork, in ath10k_debug_register()
2554 init_completion(&ar->debug.tpc_complete); in ath10k_debug_register()
2555 init_completion(&ar->debug.fw_stats_complete); in ath10k_debug_register()
2557 debugfs_create_file("fw_stats", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2560 debugfs_create_file("fw_reset_stats", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2563 debugfs_create_file("wmi_services", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2566 debugfs_create_file("simulate_fw_crash", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2569 debugfs_create_file("reg_addr", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2572 debugfs_create_file("reg_value", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2575 debugfs_create_file("mem_value", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2578 debugfs_create_file("chip_id", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2581 debugfs_create_file("htt_stats_mask", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2584 debugfs_create_file("htt_max_amsdu_ampdu", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2587 debugfs_create_file("fw_dbglog", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2592 debugfs_create_file("cal_data", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2595 debugfs_create_file("nf_cal_period", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2599 debugfs_create_file("ani_enable", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2603 debugfs_create_file("dfs_simulate_radar", 0200, ar->debug.debugfs_phy, in ath10k_debug_register()
2607 ar->debug.debugfs_phy, in ath10k_debug_register()
2610 debugfs_create_file("dfs_stats", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2614 debugfs_create_file("pktlog_filter", 0644, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2618 debugfs_create_file("quiet_period", 0644, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2621 debugfs_create_file("tpc_stats", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2625 debugfs_create_file("btcoex", 0644, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2629 debugfs_create_file("peer_stats", 0644, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2633 ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2637 debugfs_create_file("fw_checksums", 0400, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2642 ar->debug.debugfs_phy, in ath10k_debug_register()
2647 ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2652 ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2655 debugfs_create_file("ps_state_enable", 0600, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2658 debugfs_create_file("reset_htt_stats", 0200, ar->debug.debugfs_phy, ar, in ath10k_debug_register()
2666 cancel_delayed_work_sync(&ar->debug.htt_stats_dwork); in ath10k_debug_unregister()