/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef __UMAC_DEBUGS_H__ #define __UMAC_DEBUGS_H__ struct umac_rx_debugparams { unsigned int lmac_events; unsigned int rx_events; unsigned int rx_coalised_events; unsigned int total_rx_pkts_from_lmac; unsigned int max_refill_gap; unsigned int current_refill_gap; unsigned int out_oforedr_mpdus; unsigned int reoredr_free_mpdus; unsigned int umac_consumed_pkts; unsigned int host_consumed_pkts; unsigned int rx_mbox_post; unsigned int rx_mbox_receive; unsigned int reordering_ampdu; unsigned int timer_mbox_post; unsigned int timer_mbox_rcv; unsigned int work_mbox_post; unsigned int work_mbox_rcv; unsigned int tasklet_mbox_post; unsigned int tasklet_mbox_rcv; unsigned int userspace_offload_frames; unsigned int alloc_buf_fail; unsigned int rx_packet_total_count; unsigned int rx_packet_data_count; unsigned int rx_packet_qos_data_count; unsigned int rx_packet_protected_data_count; unsigned int rx_packet_mgmt_count; unsigned int rx_packet_beacon_count; unsigned int rx_packet_probe_resp_count; unsigned int rx_packet_auth_count; unsigned int rx_packet_deauth_count; unsigned int rx_packet_assoc_resp_count; unsigned int rx_packet_disassoc_count; unsigned int rx_packet_action_count; unsigned int rx_packet_probe_req_count; unsigned int rx_packet_other_mgmt_count; char max_coalised_pkts; unsigned int null_skb_pointer_from_lmac; unsigned int unexpected_mgmt_pkt; } __packed; RETENTION_MEM_SECTION extern struct umac_rx_debugparams rx_dbg; #define IMG_RX_DBG_PARAM_VAL(var) (rx_dbg.var) #define IMG_RX_DBG_PARAM_INCR(var, value) (rx_dbg.var += value) #define IMG_RX_DBG_PARAM_DECR(var, value) (rx_dbg.var -= value) #define IMG_RX_DBG_PARAM_ASSIGN(var, value) (rx_dbg.var = value) struct umac_tx_debugparams { unsigned int tx_cmd; unsigned int tx_non_coalescing_pkts_rcvd_from_host; unsigned int tx_coalescing_pkts_rcvd_from_host; unsigned int tx_max_coalescing_pkts_rcvd_from_host; unsigned int tx_cmds_max_used; unsigned int tx_cmds_currently_in_use; unsigned int tx_done_events_send_to_host; unsigned int tx_done_success_pkts_to_host; unsigned int tx_done_failure_pkts_to_host; unsigned int tx_cmds_with_crypto_pkts_rcvd_from_host; unsigned int tx_cmds_with_non_cryptot_pkts_rcvd_from_host; unsigned int tx_cmds_with_broadcast_pkts_rcvd_from_host; unsigned int tx_cmds_with_multicast_pkts_rcvd_from_host; unsigned int tx_cmds_with_unicast_pkts_rcvd_from_host; unsigned int xmit; unsigned int send_addba_req; unsigned int addba_resp; unsigned int softmac_tx; unsigned int internal_pkts; unsigned int external_pkts; unsigned int tx_cmds_to_lmac; unsigned int tx_dones_from_lmac; unsigned int total_cmds_to_lmac; unsigned int tx_packet_data_count; unsigned int tx_packet_mgmt_count; unsigned int tx_packet_beacon_count; unsigned int tx_packet_probe_req_count; unsigned int tx_packet_auth_count; unsigned int tx_packet_deauth_count; unsigned int tx_packet_assoc_req_count; unsigned int tx_packet_disassoc_count; unsigned int tx_packet_action_count; unsigned int tx_packet_other_mgmt_count; unsigned int tx_packet_non_mgmt_data_count; } __packed; RETENTION_MEM_SECTION_UNINITIALIZED extern struct umac_tx_debugparams tx_dbg; #define IMG_TX_DBG_PARAM_VAL(var) (tx_dbg.var) #define IMG_TX_DBG_PARAM_INCR(var, value) (tx_dbg.var += value) #define IMG_TX_DBG_PARAM_DECR(var, value) (tx_dbg.var -= value) struct umac_prod_debugparams { unsigned int prod_cmd_rx; unsigned int prod_cmd_tx; unsigned int prod_cmd_tx_disable; unsigned int prod_cmd_tx_enable; } __packed; RETENTION_MEM_SECTION_UNINITIALIZED extern struct umac_prod_debugparams prod_dbg; #define IMG_PROD_DBG_PARAM_VAL(var) (prod_dbg.var) #define IMG_PROD_DBG_PARAM_INCR(var, value) (prod_dbg.var += value) #define IMG_PROD_DBG_PARAM_DECR(var, value) (prod_dbg.var -= value) struct umac_sleep_debugparams { unsigned int sleep_req; unsigned int sleep_req_succ; unsigned int sleep_req_fail; unsigned int umac_init; unsigned int umac_init_warmboot; unsigned int reorder_not_empty; unsigned int outstanding_cmds; unsigned int umac_init_coldboot; unsigned int not_station; unsigned int authenticating; unsigned int associating; unsigned int cmd_processing; unsigned int tx_done_pending; unsigned int tx_cmds_currently_in_use; unsigned int events_pending_list_gg; unsigned int HPQM_CMD_NOT_EMPTY; unsigned int HPQM_EVENTQ_NOT_EMPTY; unsigned int pending_addba_resp; unsigned int get_channel; unsigned int rx_pending; unsigned int pre_init; unsigned int get_scan; unsigned int rx_mbox_pending; unsigned int tx_mbox_pending; unsigned int max_twt_awake_cnt; }; RETENTION_MEM_SECTION_UNINITIALIZED extern struct umac_sleep_debugparams sleep_dbg; #define IMG_SLEEP_DBG_PARAM_VAL(var) (sleep_dbg.var) #define IMG_SLEEP_DBG_PARAM_INCR(var, value) (sleep_dbg.var += value) #define IMG_SLEEP_DBG_PARAM_DECR(var, value) (sleep_dbg.var -= value) struct img_cmd_event_dbg { unsigned char cmd_init; unsigned char event_init_done; unsigned char cmd_rf_test; unsigned char cmd_connect; unsigned int cmd_get_stats; unsigned int event_ps_state; unsigned int cmd_set_reg; unsigned int cmd_get_reg; unsigned int cmd_req_set_reg; unsigned int cmd_trigger_scan; unsigned int event_scan_done; unsigned int cmd_get_scan; unsigned int umac_scan_req; unsigned int umac_scan_complete; unsigned int umac_scan_busy; unsigned int cmd_auth; unsigned int cmd_assoc; unsigned int cmd_deauth; unsigned int cmd_register_frame; unsigned int cmd_frame; unsigned int cmd_del_key; unsigned int cmd_new_key; unsigned int cmd_set_key; unsigned int cmd_get_key; unsigned int event_beacon_hint; unsigned int event_reg_change; unsigned int event_wiphy_reg_change; unsigned int cmd_set_station; unsigned int cmd_new_station; unsigned int cmd_del_station; unsigned int cmd_new_interface; unsigned int cmd_set_interface; unsigned int cmd_get_interface; unsigned int cmd_set_ifflags; unsigned int cmd_set_ifflags_done; unsigned int cmd_set_bss; unsigned int cmd_set_wiphy; unsigned int cmd_start_ap; unsigned int LMAC_CMD_PS; unsigned int CURR_STATE; } __packed; RETENTION_MEM_SECTION_UNINITIALIZED extern struct img_cmd_event_dbg img_cmd_event_dbg_params; #define IMG_CMD_EVENT_DBG_PARAM_INCR(var, value) (img_cmd_event_dbg_params.var\ += value) #define IMG_CMD_EVENT_DBG_PARAM_DECR(var, value) (img_cmd_event_dbg_params.var\ -= value) struct img_ap_dbg { unsigned int ap_bss_info_changed; unsigned int enable_beacon; unsigned int del_bcn_timer; unsigned int bcn_timer_expiry; unsigned int bcn_enabled_flag; }; extern struct img_ap_dbg img_ap_dbg_params; #define IMG_AP_DBG_PARAM_INCR(var, value) (img_ap_dbg_params.var += value) #define IMG_AP_DBG_PARAM_DECR(var, value) (img_ap_dbg_params.var -= value) #endif /* __UMAC_DEBUGS_H__ */