qcacmn: Fix QDF trace documentation
The kernel-doc script identified documentation issues in the QDF trace abstractions, so fix those issues. In addition, there are instances where public functions have their implementation documented instead of having their interface documented, so move that documentation. Change-Id: Ife16fe9527dbe013003c5f2f04d7e9d0a9aa385a CRs-Fixed: 3406201
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4eedfd8cf7
commit
c3c262ca32
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -143,7 +143,7 @@ typedef int (qdf_abstract_print)(void *priv, const char *fmt, ...);
|
|||||||
#define NO_SESSION 0xFF
|
#define NO_SESSION 0xFF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* typedef struct qdf_trace_record_s - keep trace record
|
* struct qdf_trace_record_s - keep trace record
|
||||||
* @qtime: qtimer ticks
|
* @qtime: qtimer ticks
|
||||||
* @time: user timestamp
|
* @time: user timestamp
|
||||||
* @module: module name
|
* @module: module name
|
||||||
@@ -163,7 +163,7 @@ typedef struct qdf_trace_record_s {
|
|||||||
} qdf_trace_record_t, *tp_qdf_trace_record;
|
} qdf_trace_record_t, *tp_qdf_trace_record;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* typedef struct s_qdf_trace_data - MTRACE logs are stored in ring buffer
|
* struct s_qdf_trace_data - MTRACE logs are stored in ring buffer
|
||||||
* @head: position of first record
|
* @head: position of first record
|
||||||
* @tail: position of last record
|
* @tail: position of last record
|
||||||
* @num: count of total record
|
* @num: count of total record
|
||||||
@@ -185,7 +185,7 @@ typedef struct s_qdf_trace_data {
|
|||||||
* enum diag_dp_tx_rx_status - TX/RX packet status
|
* enum diag_dp_tx_rx_status - TX/RX packet status
|
||||||
* @DIAG_TX_RX_STATUS_INVALID: default invalid status
|
* @DIAG_TX_RX_STATUS_INVALID: default invalid status
|
||||||
* @DIAG_TX_RX_STATUS_OK: successfully sent + acked
|
* @DIAG_TX_RX_STATUS_OK: successfully sent + acked
|
||||||
* @DIAG_TX_RX_STATUS_DISCARD: queued but not sent over air
|
* @DIAG_TX_RX_STATUS_FW_DISCARD: queued but not sent over air
|
||||||
* @DIAG_TX_RX_STATUS_NO_ACK: packet sent but no ack received
|
* @DIAG_TX_RX_STATUS_NO_ACK: packet sent but no ack received
|
||||||
* @DIAG_TX_RX_STATUS_DROP: packet dropped due to congestion
|
* @DIAG_TX_RX_STATUS_DROP: packet dropped due to congestion
|
||||||
* @DIAG_TX_RX_STATUS_DOWNLOAD_SUCC: packet delivered to target
|
* @DIAG_TX_RX_STATUS_DOWNLOAD_SUCC: packet delivered to target
|
||||||
@@ -242,52 +242,53 @@ enum diag_tx_status wlan_get_diag_tx_status(enum qdf_dp_tx_rx_status tx_status);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* enum QDF_DP_TRACE_ID - Generic ID to identify various events in data path
|
* enum QDF_DP_TRACE_ID - Generic ID to identify various events in data path
|
||||||
* @QDF_DP_TRACE_INVALID - invalid
|
* @QDF_DP_TRACE_INVALID: invalid
|
||||||
* @QDF_DP_TRACE_DROP_PACKET_RECORD - record drop packet
|
* @QDF_DP_TRACE_DROP_PACKET_RECORD: record drop packet
|
||||||
* @QDF_DP_TRACE_EAPOL_PACKET_RECORD - record EAPOL packet
|
* @QDF_DP_TRACE_EAPOL_PACKET_RECORD: record EAPOL packet
|
||||||
* @QDF_DP_TRACE_DHCP_PACKET_RECORD - record DHCP packet
|
* @QDF_DP_TRACE_DHCP_PACKET_RECORD: record DHCP packet
|
||||||
* @QDF_DP_TRACE_ARP_PACKET_RECORD - record ARP packet
|
* @QDF_DP_TRACE_ARP_PACKET_RECORD: record ARP packet
|
||||||
* @QDF_DP_TRACE_MGMT_PACKET_RECORD - record MGMT pacekt
|
* @QDF_DP_TRACE_MGMT_PACKET_RECORD: record MGMT pacekt
|
||||||
* @QDF_DP_TRACE_EVENT_RECORD - record events
|
* @QDF_DP_TRACE_EVENT_RECORD: record events
|
||||||
* @QDF_DP_TRACE_BASE_VERBOSITY - below this are part of base verbosity
|
* @QDF_DP_TRACE_BASE_VERBOSITY: below this are part of base verbosity
|
||||||
* @QDF_DP_TRACE_ICMP_PACKET_RECORD - record ICMP packet
|
* @QDF_DP_TRACE_ICMP_PACKET_RECORD: record ICMP packet
|
||||||
* @QDF_DP_TRACE_ICMPv6_PACKET_RECORD - record ICMPv6 packet
|
* @QDF_DP_TRACE_ICMPv6_PACKET_RECORD: record ICMPv6 packet
|
||||||
* @QDF_DP_TRACE_HDD_TX_TIMEOUT - HDD tx timeout
|
* @QDF_DP_TRACE_HDD_TX_TIMEOUT: HDD tx timeout
|
||||||
* @QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT- SOFTAP HDD tx timeout
|
* @QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT: SOFTAP HDD tx timeout
|
||||||
* @QDF_DP_TRACE_TX_CREDIT_RECORD - credit update record
|
* @QDF_DP_TRACE_TX_CREDIT_RECORD: credit update record
|
||||||
* @QDF_DP_TRACE_ULTRA_LOW_VERBOSITY - Below this is not logged for >4PPS
|
* @QDF_DP_TRACE_ULTRA_LOW_VERBOSITY: Below this is not logged for >4PPS
|
||||||
* @QDF_DP_TRACE_TX_PACKET_RECORD - record 32 bytes of tx pkt at any layer
|
* @QDF_DP_TRACE_TX_PACKET_RECORD: record 32 bytes of tx pkt at any layer
|
||||||
* @QDF_DP_TRACE_RX_PACKET_RECORD - record 32 bytes of rx pkt at any layer
|
* @QDF_DP_TRACE_RX_PACKET_RECORD: record 32 bytes of rx pkt at any layer
|
||||||
* @QDF_DP_TRACE_HDD_TX_PACKET_RECORD - record 32 bytes of tx pkt at HDD
|
* @QDF_DP_TRACE_HDD_TX_PACKET_RECORD: record 32 bytes of tx pkt at HDD
|
||||||
* @QDF_DP_TRACE_HDD_RX_PACKET_RECORD - record 32 bytes of rx pkt at HDD
|
* @QDF_DP_TRACE_HDD_RX_PACKET_RECORD: record 32 bytes of rx pkt at HDD
|
||||||
* @QDF_DP_TRACE_LI_DP_TX_PACKET_RECORD - record data bytes of tx pkt at LI_DP
|
* @QDF_DP_TRACE_LI_DP_TX_PACKET_RECORD: record data bytes of tx pkt at LI_DP
|
||||||
* @QDF_DP_TRACE_LI_DP_RX_PACKET_RECORD - record data bytes of rx pkt at LI_DP
|
* @QDF_DP_TRACE_LI_DP_RX_PACKET_RECORD: record data bytes of rx pkt at LI_DP
|
||||||
* @QDF_DP_TRACE_LI_DP_FREE_PACKET_PTR_RECORD - tx completion ptr record for
|
* @QDF_DP_TRACE_LI_DP_FREE_PACKET_PTR_RECORD: tx completion ptr record for
|
||||||
* lithium
|
* lithium
|
||||||
* @QDF_DP_TRACE_FREE_PACKET_PTR_RECORD - tx completion ptr record
|
* @QDF_DP_TRACE_FREE_PACKET_PTR_RECORD: tx completion ptr record
|
||||||
* @QDF_DP_TRACE_LOW_VERBOSITY - below this are part of low verbosity
|
* @QDF_DP_TRACE_LOW_VERBOSITY: below this are part of low verbosity
|
||||||
* @QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD - HDD layer ptr record
|
* @QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD: HDD layer ptr record
|
||||||
* @QDF_DP_TRACE_TX_PACKET_PTR_RECORD - DP component Tx ptr record
|
* @QDF_DP_TRACE_TX_PACKET_PTR_RECORD: DP component Tx ptr record
|
||||||
* @QDF_DP_TRACE_LI_DP_TX_PACKET_PTR_RECORD - Lithium DP layer ptr record
|
* @QDF_DP_TRACE_LI_DP_TX_PACKET_PTR_RECORD: Lithium DP layer ptr record
|
||||||
* @QDF_DP_TRACE_RX_PACKET_PTR_RECORD - DP component Rx ptr record
|
* @QDF_DP_TRACE_RX_PACKET_PTR_RECORD: DP component Rx ptr record
|
||||||
* @QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD - HDD RX record
|
* @QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD: HDD RX record
|
||||||
* @QDF_DP_TRACE_CE_PACKET_PTR_RECORD - CE layer ptr record
|
* @QDF_DP_TRACE_CE_PACKET_PTR_RECORD: CE layer ptr record
|
||||||
* @QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD- CE fastpath ptr record
|
* @QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD: CE fastpath ptr record
|
||||||
* @QDF_DP_TRACE_CE_FAST_PACKET_ERR_RECORD- CE fastpath error record
|
* @QDF_DP_TRACE_CE_FAST_PACKET_ERR_RECORD: CE fastpath error record
|
||||||
* @QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD - HTT RX record
|
* @QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD: HTT RX record
|
||||||
* @QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD- HTT RX offload record
|
* @QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD: HTT RX offload record
|
||||||
* @QDF_DP_TRACE_RX_LI_DP_PACKET_PTR_RECORD - Lithium DP RX record
|
* @QDF_DP_TRACE_RX_LI_DP_PACKET_PTR_RECORD: Lithium DP RX record
|
||||||
* @QDF_DP_TRACE_MED_VERBOSITY - below this are part of med verbosity
|
* @QDF_DP_TRACE_MED_VERBOSITY: below this are part of med verbosity
|
||||||
* @QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD -tx queue ptr record
|
* @QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD: tx queue ptr record
|
||||||
* @QDF_DP_TRACE_TXRX_PACKET_PTR_RECORD - txrx packet ptr record
|
* @QDF_DP_TRACE_TXRX_PACKET_PTR_RECORD: txrx packet ptr record
|
||||||
* @QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD - txrx fast path record
|
* @QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD: txrx fast path record
|
||||||
* @QDF_DP_TRACE_HTT_PACKET_PTR_RECORD - htt packet ptr record
|
* @QDF_DP_TRACE_HTT_PACKET_PTR_RECORD: htt packet ptr record
|
||||||
* @QDF_DP_TRACE_HTC_PACKET_PTR_RECORD - htc packet ptr record
|
* @QDF_DP_TRACE_HTC_PACKET_PTR_RECORD: htc packet ptr record
|
||||||
* @QDF_DP_TRACE_HIF_PACKET_PTR_RECORD - hif packet ptr record
|
* @QDF_DP_TRACE_HIF_PACKET_PTR_RECORD: hif packet ptr record
|
||||||
* @QDF_DP_TRACE_RX_TXRX_PACKET_PTR_RECORD - txrx packet ptr record
|
* @QDF_DP_TRACE_RX_TXRX_PACKET_PTR_RECORD: txrx packet ptr record
|
||||||
* @QDF_DP_TRACE_LI_DP_NULL_RX_PACKET_RECORD
|
* @QDF_DP_TRACE_LI_DP_NULL_RX_PACKET_RECORD:
|
||||||
* - record data bytes of rx null_queue pkt at LI_DP
|
* record data bytes of rx null_queue pkt at LI_DP
|
||||||
* @QDF_DP_TRACE_HIGH_VERBOSITY - below this are part of high verbosity
|
* @QDF_DP_TRACE_HIGH_VERBOSITY: below this are part of high verbosity
|
||||||
|
* @QDF_DP_TRACE_MAX: Max enumeration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum QDF_DP_TRACE_ID {
|
enum QDF_DP_TRACE_ID {
|
||||||
@@ -339,7 +340,7 @@ enum QDF_DP_TRACE_ID {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_proto_dir - direction
|
* enum qdf_proto_dir - direction
|
||||||
* @QDF_TX: TX direction
|
* @QDF_TX: TX direction
|
||||||
* @QDF_RX: RX direction
|
* @QDF_RX: RX direction
|
||||||
* @QDF_NA: not applicable
|
* @QDF_NA: not applicable
|
||||||
@@ -351,7 +352,7 @@ enum qdf_proto_dir {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* QDF_CREDIT_UPDATE_SOURCE - source of credit record
|
* enum QDF_CREDIT_UPDATE_SOURCE - source of credit record
|
||||||
* @QDF_TX_SCHED: Tx scheduler
|
* @QDF_TX_SCHED: Tx scheduler
|
||||||
* @QDF_TX_COMP: TX completion
|
* @QDF_TX_COMP: TX completion
|
||||||
* @QDF_TX_CREDIT_UPDATE: credit update indication
|
* @QDF_TX_CREDIT_UPDATE: credit update indication
|
||||||
@@ -367,7 +368,7 @@ enum QDF_CREDIT_UPDATE_SOURCE {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* QDF_CREDIT_OPERATION - operation on credit
|
* enum QDF_CREDIT_OPERATION - operation on credit
|
||||||
* @QDF_CREDIT_INC: credit increment
|
* @QDF_CREDIT_INC: credit increment
|
||||||
* @QDF_CREDIT_DEC: credit decrement
|
* @QDF_CREDIT_DEC: credit decrement
|
||||||
* @QDF_CREDIT_ABS: Abosolute credit
|
* @QDF_CREDIT_ABS: Abosolute credit
|
||||||
@@ -396,7 +397,7 @@ struct qdf_dp_trace_ptr_buf {
|
|||||||
* struct qdf_dp_trace_proto_buf - proto packet buffer
|
* struct qdf_dp_trace_proto_buf - proto packet buffer
|
||||||
* @sa: source address
|
* @sa: source address
|
||||||
* @da: destination address
|
* @da: destination address
|
||||||
* @vdev_id : vdev id
|
* @vdev_id: vdev id
|
||||||
* @type: packet type
|
* @type: packet type
|
||||||
* @subtype: packet subtype
|
* @subtype: packet subtype
|
||||||
* @dir: direction
|
* @dir: direction
|
||||||
@@ -419,7 +420,7 @@ struct qdf_dp_trace_proto_buf {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_dp_trace_mgmt_buf - mgmt packet buffer
|
* struct qdf_dp_trace_mgmt_buf - mgmt packet buffer
|
||||||
* @vdev_id : vdev id
|
* @vdev_id: vdev id
|
||||||
* @type: packet type
|
* @type: packet type
|
||||||
* @subtype: packet subtype
|
* @subtype: packet subtype
|
||||||
*/
|
*/
|
||||||
@@ -449,7 +450,7 @@ struct qdf_dp_trace_credit_record {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_dp_trace_event_buf - event buffer
|
* struct qdf_dp_trace_event_buf - event buffer
|
||||||
* @vdev_id : vdev id
|
* @vdev_id: vdev id
|
||||||
* @type: packet type
|
* @type: packet type
|
||||||
* @subtype: packet subtype
|
* @subtype: packet subtype
|
||||||
*/
|
*/
|
||||||
@@ -461,7 +462,7 @@ struct qdf_dp_trace_event_buf {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_dp_trace_data_buf - nbuf data buffer
|
* struct qdf_dp_trace_data_buf - nbuf data buffer
|
||||||
* @msdu_id : msdu id
|
* @msdu_id: msdu id
|
||||||
*/
|
*/
|
||||||
struct qdf_dp_trace_data_buf {
|
struct qdf_dp_trace_data_buf {
|
||||||
uint16_t msdu_id;
|
uint16_t msdu_id;
|
||||||
@@ -473,7 +474,8 @@ struct qdf_dp_trace_data_buf {
|
|||||||
* @code: Describes the particular event
|
* @code: Describes the particular event
|
||||||
* @data: buffer to store data
|
* @data: buffer to store data
|
||||||
* @size: Length of the valid data stored in this record
|
* @size: Length of the valid data stored in this record
|
||||||
* @pid : process id which stored the data in this record
|
* @pid: process id which stored the data in this record
|
||||||
|
* @pdev_id: pdev associated with the event
|
||||||
*/
|
*/
|
||||||
struct qdf_dp_trace_record_s {
|
struct qdf_dp_trace_record_s {
|
||||||
uint64_t time;
|
uint64_t time;
|
||||||
@@ -485,7 +487,7 @@ struct qdf_dp_trace_record_s {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_dp_trace_data - Parameters to configure/control DP trace
|
* struct s_qdf_dp_trace_data - Parameters to configure/control DP trace
|
||||||
* @head: Position of first record
|
* @head: Position of first record
|
||||||
* @tail: Position of last record
|
* @tail: Position of last record
|
||||||
* @num: Current index
|
* @num: Current index
|
||||||
@@ -493,13 +495,15 @@ struct qdf_dp_trace_record_s {
|
|||||||
* @no_of_record: defines every nth packet to be traced
|
* @no_of_record: defines every nth packet to be traced
|
||||||
* @num_records_to_dump: defines number of records to be dumped
|
* @num_records_to_dump: defines number of records to be dumped
|
||||||
* @dump_counter: counter to track number of records dumped
|
* @dump_counter: counter to track number of records dumped
|
||||||
* @verbosity : defines verbosity level
|
* @verbosity: defines verbosity level
|
||||||
* @ini_conf_verbosity: Configured verbosity from INI
|
* @ini_conf_verbosity: Configured verbosity from INI
|
||||||
* @enable: enable/disable DP trace
|
* @enable: enable/disable DP trace
|
||||||
* @count: current packet number
|
* @count: current packet number
|
||||||
* @live_mode_config: configuration as received during initialization
|
* @live_mode_config: configuration as received during initialization
|
||||||
* @live_mode: current live mode, enabled or disabled, can be throttled based
|
* @live_mode: current live mode, enabled or disabled, can be throttled based
|
||||||
* on throughput
|
* on throughput
|
||||||
|
* @curr_pos:
|
||||||
|
* @saved_tail:
|
||||||
* @force_live_mode: flag to enable live mode all the time for all packets.
|
* @force_live_mode: flag to enable live mode all the time for all packets.
|
||||||
* This can be set/unset from userspace and overrides other
|
* This can be set/unset from userspace and overrides other
|
||||||
* live mode flags.
|
* live mode flags.
|
||||||
@@ -508,6 +512,8 @@ struct qdf_dp_trace_record_s {
|
|||||||
* @high_tput_thresh: thresh beyond which live mode is turned off
|
* @high_tput_thresh: thresh beyond which live mode is turned off
|
||||||
* @thresh_time_limit: max time, in terms of BW timer intervals to wait,
|
* @thresh_time_limit: max time, in terms of BW timer intervals to wait,
|
||||||
* for determining if high_tput_thresh has been crossed. ~1s
|
* for determining if high_tput_thresh has been crossed. ~1s
|
||||||
|
* @tx_count: tx counter
|
||||||
|
* @rx_count: rx counter
|
||||||
* @arp_req: stats for arp reqs
|
* @arp_req: stats for arp reqs
|
||||||
* @arp_resp: stats for arp resps
|
* @arp_resp: stats for arp resps
|
||||||
* @icmp_req: stats for icmp reqs
|
* @icmp_req: stats for icmp reqs
|
||||||
@@ -581,7 +587,7 @@ struct s_qdf_dp_trace_data {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_dpt_debugfs_state - state to control read to debugfs file
|
* enum qdf_dpt_debugfs_state - state to control read to debugfs file
|
||||||
* @QDF_DPT_DEBUGFS_STATE_SHOW_STATE_INVALID: invalid state
|
* @QDF_DPT_DEBUGFS_STATE_SHOW_STATE_INVALID: invalid state
|
||||||
* @QDF_DPT_DEBUGFS_STATE_SHOW_STATE_INIT: initial state
|
* @QDF_DPT_DEBUGFS_STATE_SHOW_STATE_INIT: initial state
|
||||||
* @QDF_DPT_DEBUGFS_STATE_SHOW_IN_PROGRESS: read is in progress
|
* @QDF_DPT_DEBUGFS_STATE_SHOW_IN_PROGRESS: read is in progress
|
||||||
@@ -600,9 +606,38 @@ enum qdf_dpt_debugfs_state {
|
|||||||
typedef void (*tp_qdf_trace_cb)(void *p_mac, tp_qdf_trace_record, uint16_t);
|
typedef void (*tp_qdf_trace_cb)(void *p_mac, tp_qdf_trace_record, uint16_t);
|
||||||
typedef void (*tp_qdf_state_info_cb) (char **buf, uint16_t *size);
|
typedef void (*tp_qdf_state_info_cb) (char **buf, uint16_t *size);
|
||||||
#ifdef WLAN_FEATURE_MEMDUMP_ENABLE
|
#ifdef WLAN_FEATURE_MEMDUMP_ENABLE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_register_debugcb_init() - initializes debug callbacks
|
||||||
|
* to NULL
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_register_debugcb_init(void);
|
void qdf_register_debugcb_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_register_debug_callback() - stores callback handlers to print
|
||||||
|
* state information
|
||||||
|
* @module_id: module id of layer
|
||||||
|
* @qdf_state_infocb: callback to be registered
|
||||||
|
*
|
||||||
|
* This function is used to store callback handlers to print
|
||||||
|
* state information
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_register_debug_callback(QDF_MODULE_ID module_id,
|
void qdf_register_debug_callback(QDF_MODULE_ID module_id,
|
||||||
tp_qdf_state_info_cb qdf_state_infocb);
|
tp_qdf_state_info_cb qdf_state_infocb);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_state_info_dump_all() - it invokes callback of layer which registered
|
||||||
|
* its callback to print its state information.
|
||||||
|
* @buf: buffer pointer to be passed
|
||||||
|
* @size: size of buffer to be filled
|
||||||
|
* @driver_dump_size: actual size of buffer used
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
QDF_STATUS qdf_state_info_dump_all(char *buf, uint16_t size,
|
QDF_STATUS qdf_state_info_dump_all(char *buf, uint16_t size,
|
||||||
uint16_t *driver_dump_size);
|
uint16_t *driver_dump_size);
|
||||||
#else /* WLAN_FEATURE_MEMDUMP_ENABLE */
|
#else /* WLAN_FEATURE_MEMDUMP_ENABLE */
|
||||||
@@ -612,12 +647,110 @@ static inline void qdf_register_debugcb_init(void)
|
|||||||
#endif /* WLAN_FEATURE_MEMDUMP_ENABLE */
|
#endif /* WLAN_FEATURE_MEMDUMP_ENABLE */
|
||||||
|
|
||||||
#ifdef TRACE_RECORD
|
#ifdef TRACE_RECORD
|
||||||
void qdf_trace_register(QDF_MODULE_ID, tp_qdf_trace_cb);
|
/**
|
||||||
|
* qdf_trace_register() - registers the call back functions
|
||||||
|
* @module_id: enum value of module
|
||||||
|
* @qdf_trace_callback: call back functions to display the messages in
|
||||||
|
* particular format.
|
||||||
|
*
|
||||||
|
* Registers the call back functions to display the messages in particular
|
||||||
|
* format mentioned in these call back functions. This functions should be
|
||||||
|
* called by interested module in their init part as we will be ready to
|
||||||
|
* register as soon as modules are up.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_trace_register(QDF_MODULE_ID module_id,
|
||||||
|
tp_qdf_trace_cb qdf_trace_callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trace_init() - initializes qdf trace structures and variables
|
||||||
|
*
|
||||||
|
* Called immediately after cds_preopen, so that we can start recording HDD
|
||||||
|
* events ASAP.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_trace_init(void);
|
void qdf_trace_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trace_deinit() - frees memory allocated dynamically
|
||||||
|
*
|
||||||
|
* Called from cds_deinit, so that we can free the memory and resets
|
||||||
|
* the variables
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_trace_deinit(void);
|
void qdf_trace_deinit(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trace() - puts the messages in to ring-buffer
|
||||||
|
* @module: Enum of module, basically module id.
|
||||||
|
* @code: Code to be recorded
|
||||||
|
* @session: Session ID of the log
|
||||||
|
* @data: Actual message contents
|
||||||
|
*
|
||||||
|
* This function will be called from each module who wants record the messages
|
||||||
|
* in circular queue. Before calling this functions make sure you have
|
||||||
|
* registered your module with qdf through qdf_trace_register function.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_trace(uint8_t module, uint16_t code, uint16_t session, uint32_t data);
|
void qdf_trace(uint8_t module, uint16_t code, uint16_t session, uint32_t data);
|
||||||
void qdf_trace_enable(uint32_t, uint8_t enable);
|
|
||||||
void qdf_trace_dump_all(void *, uint8_t, uint8_t, uint32_t, uint32_t);
|
/**
|
||||||
|
* qdf_trace_enable() - Enable MTRACE for specific modules
|
||||||
|
* @bitmask_of_module_id: Bitmask according to enum of the modules.
|
||||||
|
* 32[dec] = 0010 0000 [bin] <enum of HDD is 5>
|
||||||
|
* 64[dec] = 0100 0000 [bin] <enum of SME is 6>
|
||||||
|
* 128[dec] = 1000 0000 [bin] <enum of PE is 7>
|
||||||
|
* @enable: can be true or false true implies enabling MTRACE false implies
|
||||||
|
* disabling MTRACE.
|
||||||
|
*
|
||||||
|
* Enable MTRACE for specific modules whose bits are set in bitmask and enable
|
||||||
|
* is true. if enable is false it disables MTRACE for that module. set the
|
||||||
|
* bitmask according to enum value of the modules.
|
||||||
|
* This functions will be called when you issue ioctl as mentioned following
|
||||||
|
* [iwpriv wlan0 setdumplog <value> <enable>].
|
||||||
|
* <value> - Decimal number, i.e. 64 decimal value shows only SME module,
|
||||||
|
* 128 decimal value shows only PE module, 192 decimal value shows PE and SME.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_trace_enable(uint32_t bitmask_of_module_id, uint8_t enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trace_dump_all() - Dump data from ring buffer via call back functions
|
||||||
|
* registered with QDF
|
||||||
|
* @p_mac: Context of particular module
|
||||||
|
* @code: Reason code
|
||||||
|
* @session: Session id of log
|
||||||
|
* @count: Number of lines to dump starting from tail to head
|
||||||
|
* @bitmask_of_module: Bitmask according to enum of the modules.
|
||||||
|
*
|
||||||
|
* This function will be called up on issuing ioctl call as mentioned following
|
||||||
|
* [iwpriv wlan0 dumplog 0 0 <n> <bitmask_of_module>]
|
||||||
|
*
|
||||||
|
* <n> - number lines to dump starting from tail to head.
|
||||||
|
*
|
||||||
|
* <bitmask_of_module> - if anybody wants to know how many messages were
|
||||||
|
* recorded for particular module/s mentioned by setbit in bitmask from last
|
||||||
|
* <n> messages. It is optional, if you don't provide then it will dump
|
||||||
|
* everything from buffer.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_trace_dump_all(void *p_mac, uint8_t code, uint8_t session,
|
||||||
|
uint32_t count, uint32_t bitmask_of_module);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trace_spin_lock_init() - initializes the lock variable before use
|
||||||
|
*
|
||||||
|
* This function will be called from cds_alloc_global_context, we will have lock
|
||||||
|
* available to use ASAP
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
QDF_STATUS qdf_trace_spin_lock_init(void);
|
QDF_STATUS qdf_trace_spin_lock_init(void);
|
||||||
#else
|
#else
|
||||||
#ifndef QDF_TRACE_PRINT_ENABLE
|
#ifndef QDF_TRACE_PRINT_ENABLE
|
||||||
@@ -669,7 +802,7 @@ bool qdf_detected_excessive_logging(void);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_rl_print_count_set() - set the ratelimiting print count
|
* qdf_rl_print_count_set() - set the ratelimiting print count
|
||||||
* @rl_print_time: ratelimiting print count
|
* @rl_print_count: ratelimiting print count
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
@@ -767,9 +900,30 @@ void qdf_mtrace(QDF_MODULE_ID src_module, QDF_MODULE_ID dst_module,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DP_TRACE
|
#ifdef CONFIG_DP_TRACE
|
||||||
|
/**
|
||||||
|
* qdf_dp_set_proto_bitmap() - set dp trace proto bitmap
|
||||||
|
* @val: unsigned bitmap to set
|
||||||
|
*
|
||||||
|
* Return: proto bitmap
|
||||||
|
*/
|
||||||
void qdf_dp_set_proto_bitmap(uint32_t val);
|
void qdf_dp_set_proto_bitmap(uint32_t val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_set_verbosity() - set verbosity value
|
||||||
|
* @val: Value to set
|
||||||
|
*
|
||||||
|
* Return: Null
|
||||||
|
*/
|
||||||
void qdf_dp_trace_set_verbosity(uint32_t val);
|
void qdf_dp_trace_set_verbosity(uint32_t val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_set_no_of_record() - set dp trace no_of_record
|
||||||
|
* @val: unsigned no_of_record to set
|
||||||
|
*
|
||||||
|
* Return: null
|
||||||
|
*/
|
||||||
void qdf_dp_set_no_of_record(uint32_t val);
|
void qdf_dp_set_no_of_record(uint32_t val);
|
||||||
|
|
||||||
#define QDF_DP_TRACE_RECORD_INFO_LIVE (0x1)
|
#define QDF_DP_TRACE_RECORD_INFO_LIVE (0x1)
|
||||||
#define QDF_DP_TRACE_RECORD_INFO_THROTTLED (0x1 << 1)
|
#define QDF_DP_TRACE_RECORD_INFO_THROTTLED (0x1 << 1)
|
||||||
|
|
||||||
@@ -785,16 +939,81 @@ void qdf_dp_set_no_of_record(uint32_t val);
|
|||||||
bool qdf_dp_trace_log_pkt(uint8_t vdev_id, struct sk_buff *skb,
|
bool qdf_dp_trace_log_pkt(uint8_t vdev_id, struct sk_buff *skb,
|
||||||
enum qdf_proto_dir dir, uint8_t pdev_id);
|
enum qdf_proto_dir dir, uint8_t pdev_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_init() - enables the DP trace
|
||||||
|
* @live_mode_config: live mode configuration
|
||||||
|
* @thresh: high throughput threshold for disabling live mode
|
||||||
|
* @time_limit: max time to wait before deciding if thresh is crossed
|
||||||
|
* @verbosity: dptrace verbosity level
|
||||||
|
* @proto_bitmap: bitmap to enable/disable specific protocols
|
||||||
|
*
|
||||||
|
* Called during driver load to init dptrace
|
||||||
|
*
|
||||||
|
* A brief note on the 'thresh' param -
|
||||||
|
* Total # of packets received in a bandwidth timer interval beyond which
|
||||||
|
* DP Trace logging for data packets (including ICMP) will be disabled.
|
||||||
|
* In memory logging will still continue for these packets. Other packets for
|
||||||
|
* which proto.bitmap is set will continue to be recorded in logs and in memory.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace_init(bool live_mode_config, uint8_t thresh,
|
void qdf_dp_trace_init(bool live_mode_config, uint8_t thresh,
|
||||||
uint16_t time_limit, uint8_t verbosity,
|
uint16_t time_limit, uint8_t verbosity,
|
||||||
uint32_t proto_bitmap);
|
uint32_t proto_bitmap);
|
||||||
|
|
||||||
void qdf_dp_trace_deinit(void);
|
void qdf_dp_trace_deinit(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_spin_lock_init() - initializes the lock variable before use
|
||||||
|
* This function will be called from cds_alloc_global_context, we will have lock
|
||||||
|
* available to use ASAP
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace_spin_lock_init(void);
|
void qdf_dp_trace_spin_lock_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_set_value() - Configure the value to control DP trace
|
||||||
|
* @proto_bitmap: defines the protocol to be tracked
|
||||||
|
* @no_of_records: defines the nth packet which is traced
|
||||||
|
* @verbosity: defines the verbosity level
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace_set_value(uint32_t proto_bitmap, uint8_t no_of_records,
|
void qdf_dp_trace_set_value(uint32_t proto_bitmap, uint8_t no_of_records,
|
||||||
uint8_t verbosity);
|
uint8_t verbosity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_set_track() - Marks whether the packet needs to be traced
|
||||||
|
* @nbuf: defines the netbuf
|
||||||
|
* @dir: direction
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir);
|
void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace() - Stores the data in buffer
|
||||||
|
* @nbuf: defines the netbuf
|
||||||
|
* @code: defines the event
|
||||||
|
* @pdev_id: pdev_id
|
||||||
|
* @data: defines the data to be stored
|
||||||
|
* @size: defines the size of the data record
|
||||||
|
* @dir: direction
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
||||||
uint8_t *data, uint8_t size, enum qdf_proto_dir dir);
|
uint8_t *data, uint8_t size, enum qdf_proto_dir dir);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_dump_all() - Dump data from ring buffer via call back functions
|
||||||
|
* registered with QDF
|
||||||
|
* @count: Number of lines to dump starting from tail to head
|
||||||
|
* @pdev_id: pdev_id
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id);
|
void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -820,7 +1039,7 @@ QDF_STATUS qdf_dpt_dump_stats_debugfs(qdf_debugfs_file_t file,
|
|||||||
* qdf_dpt_set_value_debugfs() - set value of DP Trace debugfs params
|
* qdf_dpt_set_value_debugfs() - set value of DP Trace debugfs params
|
||||||
* @proto_bitmap: defines which protocol to be traced
|
* @proto_bitmap: defines which protocol to be traced
|
||||||
* @no_of_record: defines every nth packet to be traced
|
* @no_of_record: defines every nth packet to be traced
|
||||||
* @verbosity : defines verbosity level
|
* @verbosity: defines verbosity level
|
||||||
* @num_records_to_dump: defines number of records to be dumped
|
* @num_records_to_dump: defines number of records to be dumped
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
@@ -891,26 +1110,29 @@ qdf_dp_display_data_pkt_record(struct qdf_dp_trace_record_s *record,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_get_status_from_htt() - Convert htt tx status to qdf dp status
|
* qdf_dp_get_status_from_htt() - Convert htt tx status to qdf dp status
|
||||||
* @status : htt_tx_status which needs to be converted
|
* @status: htt_tx_status which needs to be converted
|
||||||
*
|
*
|
||||||
* Return : the status that from qdf_dp_tx_rx_status
|
* Return: the status that from qdf_dp_tx_rx_status
|
||||||
*/
|
*/
|
||||||
enum qdf_dp_tx_rx_status qdf_dp_get_status_from_htt(uint8_t status);
|
enum qdf_dp_tx_rx_status qdf_dp_get_status_from_htt(uint8_t status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_get_status_from_a_status() - Convert A_STATUS to qdf dp status
|
* qdf_dp_get_status_from_a_status() - Convert A_STATUS to qdf dp status
|
||||||
* @status : A_STATUS which needs to be converted
|
* @status: A_STATUS which needs to be converted
|
||||||
*
|
*
|
||||||
* Return : the status that from qdf_dp_tx_rx_status
|
* Return: the status that from qdf_dp_tx_rx_status
|
||||||
*/
|
*/
|
||||||
enum qdf_dp_tx_rx_status qdf_dp_get_status_from_a_status(uint8_t status);
|
enum qdf_dp_tx_rx_status qdf_dp_get_status_from_a_status(uint8_t status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_trace_ptr() - record dptrace
|
* qdf_dp_trace_ptr() - record dptrace
|
||||||
|
* @nbuf: network buffer
|
||||||
* @code: dptrace code
|
* @code: dptrace code
|
||||||
* @pdev_id: pdev_id
|
* @pdev_id: pdev_id
|
||||||
* @data: data
|
* @data: data
|
||||||
* @size: size of data
|
* @size: size of data
|
||||||
* @msdu_id: msdu_id
|
* @msdu_id: msdu_id
|
||||||
* @status: return status
|
* @buf_arg_status: return status
|
||||||
* @qdf_tx_status: qdf tx rx status
|
* @qdf_tx_status: qdf tx rx status
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
@@ -919,10 +1141,27 @@ void qdf_dp_trace_ptr(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code,
|
|||||||
uint8_t pdev_id, uint8_t *data, uint8_t size,
|
uint8_t pdev_id, uint8_t *data, uint8_t size,
|
||||||
uint16_t msdu_id, uint16_t buf_arg_status,
|
uint16_t msdu_id, uint16_t buf_arg_status,
|
||||||
enum qdf_dp_tx_rx_status qdf_tx_status);
|
enum qdf_dp_tx_rx_status qdf_tx_status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_throttle_live_mode() - Throttle DP Trace live mode
|
||||||
|
* @high_bw_request: whether this is a high BW req or not
|
||||||
|
*
|
||||||
|
* The function tries to prevent excessive logging into the live buffer by
|
||||||
|
* having an upper limit on number of packets that can be logged per second.
|
||||||
|
*
|
||||||
|
* The intention is to allow occasional pings and data packets and really low
|
||||||
|
* throughput levels while suppressing bursts and higher throughput levels so
|
||||||
|
* that we donot hog the live buffer.
|
||||||
|
*
|
||||||
|
* If the number of packets printed in a particular second exceeds the thresh,
|
||||||
|
* disable printing in the next second.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_dp_trace_throttle_live_mode(bool high_bw_request);
|
void qdf_dp_trace_throttle_live_mode(bool high_bw_request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_trace_tput_policy() - Change verbosity based on the TPUT
|
* qdf_dp_trace_apply_tput_policy() - Change verbosity based on the TPUT
|
||||||
* @is_data_traffic: Is traffic more than low TPUT threashould
|
* @is_data_traffic: Is traffic more than low TPUT threashould
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
@@ -943,8 +1182,20 @@ void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf, uint8_t pdev_id,
|
|||||||
enum QDF_DP_TRACE_ID code, uint16_t msdu_id,
|
enum QDF_DP_TRACE_ID code, uint16_t msdu_id,
|
||||||
enum qdf_proto_dir dir);
|
enum qdf_proto_dir dir);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_get_proto_bitmap() - get dp trace proto bitmap
|
||||||
|
*
|
||||||
|
* Return: proto bitmap
|
||||||
|
*/
|
||||||
uint32_t qdf_dp_get_proto_bitmap(void);
|
uint32_t qdf_dp_get_proto_bitmap(void);
|
||||||
|
|
||||||
uint8_t qdf_dp_get_verbosity(void);
|
uint8_t qdf_dp_get_verbosity(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_get_no_of_record() - get dp trace no_of_record
|
||||||
|
*
|
||||||
|
* Return: number of records
|
||||||
|
*/
|
||||||
uint8_t qdf_dp_get_no_of_record(void);
|
uint8_t qdf_dp_get_no_of_record(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -968,9 +1219,27 @@ qdf_dp_trace_proto_pkt(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
|
|||||||
enum qdf_proto_subtype subtype, enum qdf_proto_dir dir,
|
enum qdf_proto_subtype subtype, enum qdf_proto_dir dir,
|
||||||
uint8_t pdev_id, bool print, uint32_t proto_priv_data);
|
uint8_t pdev_id, bool print, uint32_t proto_priv_data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_disable_live_mode() - disable live mode for dptrace
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_dp_trace_disable_live_mode(void);
|
void qdf_dp_trace_disable_live_mode(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_enable_live_mode() - enable live mode for dptrace
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_dp_trace_enable_live_mode(void);
|
void qdf_dp_trace_enable_live_mode(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_clear_buffer() - clear dp trace buffer
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_dp_trace_clear_buffer(void);
|
void qdf_dp_trace_clear_buffer(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_trace_mgmt_pkt() - record mgmt packet
|
* qdf_dp_trace_mgmt_pkt() - record mgmt packet
|
||||||
* @code: dptrace code
|
* @code: dptrace code
|
||||||
@@ -1034,6 +1303,16 @@ void qdf_dp_display_credit_record(struct qdf_dp_trace_record_s *record,
|
|||||||
void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record,
|
void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record,
|
||||||
uint16_t index, uint8_t pdev_id, uint8_t info);
|
uint16_t index, uint8_t pdev_id, uint8_t info);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dp_trace_record_event() - record events
|
||||||
|
* @code: dptrace code
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
* @pdev_id: pdev_id
|
||||||
|
* @type: proto type
|
||||||
|
* @subtype: proto subtype
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_dp_trace_record_event(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
|
void qdf_dp_trace_record_event(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
|
||||||
uint8_t pdev_id, enum qdf_proto_type type,
|
uint8_t pdev_id, enum qdf_proto_type type,
|
||||||
enum qdf_proto_subtype subtype);
|
enum qdf_proto_subtype subtype);
|
||||||
@@ -1191,8 +1470,23 @@ enum qdf_dp_tx_rx_status qdf_dp_get_status_from_a_status(uint8_t status)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_trace_display() - Display trace
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
void qdf_trace_display(void);
|
void qdf_trace_display(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_snprintf() - wrapper function to snprintf
|
||||||
|
* @str_buffer: string Buffer
|
||||||
|
* @size: defines the size of the data record
|
||||||
|
* @str_format: Format string in which the message to be logged. This format
|
||||||
|
* string contains printf-like replacement parameters, which follow
|
||||||
|
* this parameter in the variable argument list.
|
||||||
|
*
|
||||||
|
* Return: num of bytes written to buffer
|
||||||
|
*/
|
||||||
int __printf(3, 4) qdf_snprintf(char *str_buffer, unsigned int size,
|
int __printf(3, 4) qdf_snprintf(char *str_buffer, unsigned int size,
|
||||||
char *str_format, ...);
|
char *str_format, ...);
|
||||||
|
|
||||||
@@ -1208,7 +1502,7 @@ static inline void qdf_tso_seg_dbg_bug(char *msg)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_tso_seg_dbg_init - initialize TSO segment debug structure
|
* qdf_tso_seg_dbg_init - initialize TSO segment debug structure
|
||||||
* @tsoseg : structure to initialize
|
* @tsoseg: structure to initialize
|
||||||
*
|
*
|
||||||
* TSO segment dbg structures are attached to qdf_tso_seg_elem_t
|
* TSO segment dbg structures are attached to qdf_tso_seg_elem_t
|
||||||
* structures and are allocated only of TSOSEG_DEBUG is defined.
|
* structures and are allocated only of TSOSEG_DEBUG is defined.
|
||||||
@@ -1237,8 +1531,8 @@ void qdf_tso_seg_dbg_init(struct qdf_tso_seg_elem_t *tsoseg)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_tso_seg_dbg_record - add a history entry to TSO debug structure
|
* qdf_tso_seg_dbg_record - add a history entry to TSO debug structure
|
||||||
* @tsoseg : structure to initialize
|
* @tsoseg: structure to initialize
|
||||||
* @id : operation ID (identifies the caller)
|
* @id: operation ID (identifies the caller)
|
||||||
*
|
*
|
||||||
* Adds a history entry to the history circular buffer. Each entry
|
* Adds a history entry to the history circular buffer. Each entry
|
||||||
* contains an operation id (caller, as currently each ID is used only
|
* contains an operation id (caller, as currently each ID is used only
|
||||||
@@ -1363,7 +1657,7 @@ void qdf_trace_hex_ascii_dump(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_set_pidx() - Sets the global qdf_pidx.
|
* qdf_set_pidx() - Sets the global qdf_pidx.
|
||||||
* @pidx : Index of print control object assigned to the module
|
* @pidx: Index of print control object assigned to the module
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void qdf_set_pidx(int pidx);
|
void qdf_set_pidx(int pidx);
|
||||||
@@ -1371,7 +1665,7 @@ void qdf_set_pidx(int pidx);
|
|||||||
/**
|
/**
|
||||||
* qdf_get_pidx() - Returns the global qdf_pidx.
|
* qdf_get_pidx() - Returns the global qdf_pidx.
|
||||||
*
|
*
|
||||||
* Return : Current qdf print index.
|
* Return: Current qdf print index.
|
||||||
*/
|
*/
|
||||||
int qdf_get_pidx(void);
|
int qdf_get_pidx(void);
|
||||||
/*
|
/*
|
||||||
@@ -1383,19 +1677,19 @@ int qdf_get_pidx(void);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* QDF_PRINT_INFO() - Generic wrapper API for logging
|
* QDF_PRINT_INFO() - Generic wrapper API for logging
|
||||||
* @idx : Index of print control object
|
* @idx: Index of print control object
|
||||||
* @module : Module identifier. A member of QDF_MODULE_ID enumeration that
|
* @module: Module identifier. A member of QDF_MODULE_ID enumeration that
|
||||||
* identifies the module issuing the trace message
|
* identifies the module issuing the trace message
|
||||||
* @level : Trace level. A member of QDF_TRACE_LEVEL enumeration indicating
|
* @level: Trace level. A member of QDF_TRACE_LEVEL enumeration indicating
|
||||||
* the severity of the condition causing the trace message to be
|
* the severity of the condition causing the trace message to be
|
||||||
* issued.
|
* issued.
|
||||||
* @str_format : Format string that contains the message to be logged.
|
* @str_format: Format string that contains the message to be logged.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This wrapper will be used for any generic logging messages. Wrapper will
|
* This wrapper will be used for any generic logging messages. Wrapper will
|
||||||
* compile a call to converged QDF trace message API.
|
* compile a call to converged QDF trace message API.
|
||||||
*
|
*
|
||||||
* Return : Nothing
|
* Return: Nothing
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void QDF_PRINT_INFO(unsigned int idx, QDF_MODULE_ID module,
|
void QDF_PRINT_INFO(unsigned int idx, QDF_MODULE_ID module,
|
||||||
@@ -1403,7 +1697,7 @@ void QDF_PRINT_INFO(unsigned int idx, QDF_MODULE_ID module,
|
|||||||
char *str_format, ...);
|
char *str_format, ...);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct category_info : Category information structure
|
* struct category_info - Category information structure
|
||||||
* @category_verbose_mask: Embeds information about category's verbose level
|
* @category_verbose_mask: Embeds information about category's verbose level
|
||||||
*/
|
*/
|
||||||
struct category_info {
|
struct category_info {
|
||||||
@@ -1411,7 +1705,7 @@ struct category_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct category_name_info : Category name information structure
|
* struct category_name_info - Category name information structure
|
||||||
* @category_name_str: Embeds information about category name
|
* @category_name_str: Embeds information about category name
|
||||||
*/
|
*/
|
||||||
struct category_name_info {
|
struct category_name_info {
|
||||||
@@ -1419,7 +1713,7 @@ struct category_name_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_trace_msg_cmn()- Converged logging API
|
* qdf_trace_msg_cmn() - Converged logging API
|
||||||
* @idx: Index of print control object assigned to the module
|
* @idx: Index of print control object assigned to the module
|
||||||
* @category: Category identifier. A member of the QDF_MODULE_ID enumeration
|
* @category: Category identifier. A member of the QDF_MODULE_ID enumeration
|
||||||
* that identifies the category issuing the trace message.
|
* that identifies the category issuing the trace message.
|
||||||
@@ -1442,7 +1736,7 @@ void qdf_trace_msg_cmn(unsigned int idx,
|
|||||||
va_list val);
|
va_list val);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_print_ctrl: QDF Print Control structure
|
* struct qdf_print_ctrl - QDF Print Control structure
|
||||||
* Statically allocated objects of print control
|
* Statically allocated objects of print control
|
||||||
* structure are declared that will support maximum of
|
* structure are declared that will support maximum of
|
||||||
* 32 print control objects. Any module that needs to
|
* 32 print control objects. Any module that needs to
|
||||||
@@ -1451,12 +1745,12 @@ void qdf_trace_msg_cmn(unsigned int idx,
|
|||||||
* qdf_print_ctrl_register API. It will have to pass
|
* qdf_print_ctrl_register API. It will have to pass
|
||||||
* pointer to category info structure, name and
|
* pointer to category info structure, name and
|
||||||
* custom print function to be used if required.
|
* custom print function to be used if required.
|
||||||
* @name : Optional name for the control object
|
* @name: Optional name for the control object
|
||||||
* @cat_info : Array of category_info struct
|
* @cat_info: Array of category_info struct
|
||||||
* @custom_print : Custom print handler
|
* @custom_print: Custom print handler
|
||||||
* @custom_ctxt : Custom print context
|
* @custom_ctxt: Custom print context
|
||||||
* @dbglvlmac_on : Flag to enable/disable MAC level filtering
|
* @dbglvlmac_on: Flag to enable/disable MAC level filtering
|
||||||
* @in_use : Boolean to indicate if control object is in use
|
* @in_use: Boolean to indicate if control object is in use
|
||||||
*/
|
*/
|
||||||
struct qdf_print_ctrl {
|
struct qdf_print_ctrl {
|
||||||
char name[QDF_MAX_NAME_SIZE];
|
char name[QDF_MAX_NAME_SIZE];
|
||||||
@@ -1473,12 +1767,12 @@ struct qdf_print_ctrl {
|
|||||||
* qdf_print_ctrl_register() - Allocate QDF print control object, assign
|
* qdf_print_ctrl_register() - Allocate QDF print control object, assign
|
||||||
* pointer to category info or print control
|
* pointer to category info or print control
|
||||||
* structure and return the index to the callee
|
* structure and return the index to the callee
|
||||||
* @cinfo : Pointer to array of category info structure
|
* @cinfo: Pointer to array of category info structure
|
||||||
* @custom_print_handler : Pointer to custom print handler
|
* @custom_print_handler: Pointer to custom print handler
|
||||||
* @custom_ctx : Pointer to custom context
|
* @custom_ctx: Pointer to custom context
|
||||||
* @pctrl_name : Pointer to print control object name
|
* @pctrl_name: Pointer to print control object name
|
||||||
*
|
*
|
||||||
* Return : Index of qdf_print_ctrl structure
|
* Return: Index of qdf_print_ctrl structure
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int qdf_print_ctrl_register(const struct category_info *cinfo,
|
int qdf_print_ctrl_register(const struct category_info *cinfo,
|
||||||
@@ -1488,8 +1782,7 @@ int qdf_print_ctrl_register(const struct category_info *cinfo,
|
|||||||
|
|
||||||
#ifdef QCA_WIFI_MODULE_PARAMS_FROM_INI
|
#ifdef QCA_WIFI_MODULE_PARAMS_FROM_INI
|
||||||
/**
|
/**
|
||||||
* qdf_update_module_param() - Update qdf module params
|
* qdf_initialize_module_param_from_ini() - Update qdf module params
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* Read the file which has wifi module params, parse and update
|
* Read the file which has wifi module params, parse and update
|
||||||
* qdf module params.
|
* qdf module params.
|
||||||
@@ -1508,7 +1801,7 @@ void qdf_initialize_module_param_from_ini(void)
|
|||||||
* qdf_shared_print_ctrl_init() - Initialize the shared print ctrl obj with
|
* qdf_shared_print_ctrl_init() - Initialize the shared print ctrl obj with
|
||||||
* all categories set to the default level
|
* all categories set to the default level
|
||||||
*
|
*
|
||||||
* Return : void
|
* Return: void
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void qdf_shared_print_ctrl_init(void);
|
void qdf_shared_print_ctrl_init(void);
|
||||||
@@ -1518,28 +1811,27 @@ void qdf_shared_print_ctrl_init(void);
|
|||||||
*
|
*
|
||||||
* Register new print control object for the callee
|
* Register new print control object for the callee
|
||||||
*
|
*
|
||||||
* Return : QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE
|
||||||
* on failure
|
* on failure
|
||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_print_setup(void);
|
QDF_STATUS qdf_print_setup(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_print_ctrl_cleanup() - Clean up a print control object
|
* qdf_print_ctrl_cleanup() - Clean up a print control object
|
||||||
|
* @idx: Index of print control object
|
||||||
*
|
*
|
||||||
* Cleanup the print control object for the callee
|
* Cleanup the print control object for the callee
|
||||||
*
|
*
|
||||||
* @pctrl : Index of print control object
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE on failure
|
||||||
*
|
|
||||||
* Return : QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE on failure
|
|
||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_print_ctrl_cleanup(unsigned int idx);
|
QDF_STATUS qdf_print_ctrl_cleanup(unsigned int idx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_print_ctrl_shared_cleanup() - Clean up of the shared object
|
* qdf_shared_print_ctrl_cleanup() - Clean up of the shared object
|
||||||
*
|
*
|
||||||
* Cleanup the shared print-ctrl-object
|
* Cleanup the shared print-ctrl-object
|
||||||
*
|
*
|
||||||
* Return : void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
void qdf_shared_print_ctrl_cleanup(void);
|
void qdf_shared_print_ctrl_cleanup(void);
|
||||||
|
|
||||||
@@ -1547,13 +1839,12 @@ void qdf_shared_print_ctrl_cleanup(void);
|
|||||||
* qdf_print_set_category_verbose() - Enable/Disable category for a
|
* qdf_print_set_category_verbose() - Enable/Disable category for a
|
||||||
* print control object with
|
* print control object with
|
||||||
* user provided verbose level
|
* user provided verbose level
|
||||||
*
|
* @idx: Index of the print control object assigned to callee
|
||||||
* @idx : Index of the print control object assigned to callee
|
* @category: Category information
|
||||||
* @category : Category information
|
|
||||||
* @verbose: Verbose information
|
* @verbose: Verbose information
|
||||||
* @is_set: Flag indicating if verbose level needs to be enabled or disabled
|
* @is_set: Flag indicating if verbose level needs to be enabled or disabled
|
||||||
*
|
*
|
||||||
* Return : QDF_STATUS_SUCCESS for success and QDF_STATUS_E_FAILURE for failure
|
* Return: QDF_STATUS_SUCCESS for success and QDF_STATUS_E_FAILURE for failure
|
||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_print_set_category_verbose(unsigned int idx,
|
QDF_STATUS qdf_print_set_category_verbose(unsigned int idx,
|
||||||
QDF_MODULE_ID category,
|
QDF_MODULE_ID category,
|
||||||
@@ -1589,10 +1880,10 @@ void qdf_logging_flush_logs(void);
|
|||||||
* qdf_print_is_category_enabled() - Get category information for the
|
* qdf_print_is_category_enabled() - Get category information for the
|
||||||
* print control object
|
* print control object
|
||||||
*
|
*
|
||||||
* @idx : Index of print control object
|
* @idx: Index of print control object
|
||||||
* @category : Category information
|
* @category: Category information
|
||||||
*
|
*
|
||||||
* Return : Verbose enabled(true) or disabled(false) or invalid input (false)
|
* Return: Verbose enabled(true) or disabled(false) or invalid input (false)
|
||||||
*/
|
*/
|
||||||
bool qdf_print_is_category_enabled(unsigned int idx,
|
bool qdf_print_is_category_enabled(unsigned int idx,
|
||||||
QDF_MODULE_ID category);
|
QDF_MODULE_ID category);
|
||||||
@@ -1601,11 +1892,11 @@ bool qdf_print_is_category_enabled(unsigned int idx,
|
|||||||
* qdf_print_is_verbose_enabled() - Get verbose information of a category for
|
* qdf_print_is_verbose_enabled() - Get verbose information of a category for
|
||||||
* the print control object
|
* the print control object
|
||||||
*
|
*
|
||||||
* @idx : Index of print control object
|
* @idx: Index of print control object
|
||||||
* @category : Category information
|
* @category: Category information
|
||||||
* @verbose : Verbose information
|
* @verbose: Verbose information
|
||||||
*
|
*
|
||||||
* Return : Verbose enabled(true) or disabled(false) or invalid input (false)
|
* Return: Verbose enabled(true) or disabled(false) or invalid input (false)
|
||||||
*/
|
*/
|
||||||
bool qdf_print_is_verbose_enabled(unsigned int idx,
|
bool qdf_print_is_verbose_enabled(unsigned int idx,
|
||||||
QDF_MODULE_ID category,
|
QDF_MODULE_ID category,
|
||||||
@@ -1614,9 +1905,9 @@ bool qdf_print_is_verbose_enabled(unsigned int idx,
|
|||||||
/**
|
/**
|
||||||
* qdf_print_clean_node_flag() - Clean up node flag for print control object
|
* qdf_print_clean_node_flag() - Clean up node flag for print control object
|
||||||
*
|
*
|
||||||
* @idx : Index of print control object
|
* @idx: Index of print control object
|
||||||
*
|
*
|
||||||
* Return : None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void qdf_print_clean_node_flag(unsigned int idx);
|
void qdf_print_clean_node_flag(unsigned int idx);
|
||||||
|
|
||||||
@@ -1625,10 +1916,10 @@ void qdf_print_clean_node_flag(unsigned int idx);
|
|||||||
/**
|
/**
|
||||||
* qdf_print_set_node_flag() - Set flag to enable MAC level filtering
|
* qdf_print_set_node_flag() - Set flag to enable MAC level filtering
|
||||||
*
|
*
|
||||||
* @idx : Index of print control object
|
* @idx: Index of print control object
|
||||||
* @enable : Enable/Disable bit sent by callee
|
* @enable: Enable/Disable bit sent by callee
|
||||||
*
|
*
|
||||||
* Return : QDF_STATUS_SUCCESS on Success and QDF_STATUS_E_FAILURE on Failure
|
* Return: QDF_STATUS_SUCCESS on Success and QDF_STATUS_E_FAILURE on Failure
|
||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_print_set_node_flag(unsigned int idx,
|
QDF_STATUS qdf_print_set_node_flag(unsigned int idx,
|
||||||
uint8_t enable);
|
uint8_t enable);
|
||||||
@@ -1636,9 +1927,9 @@ QDF_STATUS qdf_print_set_node_flag(unsigned int idx,
|
|||||||
/**
|
/**
|
||||||
* qdf_print_get_node_flag() - Get flag that controls MAC level filtering
|
* qdf_print_get_node_flag() - Get flag that controls MAC level filtering
|
||||||
*
|
*
|
||||||
* @idx : Index of print control object
|
* @idx: Index of print control object
|
||||||
*
|
*
|
||||||
* Return : Flag that indicates enable(1) or disable(0) or invalid(-1)
|
* Return: Flag that indicates enable(1) or disable(0) or invalid(-1)
|
||||||
*/
|
*/
|
||||||
bool qdf_print_get_node_flag(unsigned int idx);
|
bool qdf_print_get_node_flag(unsigned int idx);
|
||||||
|
|
||||||
@@ -1648,14 +1939,14 @@ bool qdf_print_get_node_flag(unsigned int idx);
|
|||||||
/**
|
/**
|
||||||
* qdf_module_param_handler() - Function to store module params
|
* qdf_module_param_handler() - Function to store module params
|
||||||
*
|
*
|
||||||
* @context : NULL, unused.
|
* @context: NULL, unused.
|
||||||
* @key : Name of the module param
|
* @key: Name of the module param
|
||||||
* @value: Value of the module param
|
* @value: Value of the module param
|
||||||
*
|
*
|
||||||
* Handler function to be called from qdf_ini_parse()
|
* Handler function to be called from qdf_ini_parse()
|
||||||
* function when a valid parameter is found in a file.
|
* function when a valid parameter is found in a file.
|
||||||
*
|
*
|
||||||
* Return : QDF_STATUS_SUCCESS on Success
|
* Return: QDF_STATUS_SUCCESS on Success
|
||||||
*/
|
*/
|
||||||
QDF_STATUS qdf_module_param_handler(void *context, const char *key,
|
QDF_STATUS qdf_module_param_handler(void *context, const char *key,
|
||||||
const char *value);
|
const char *value);
|
||||||
@@ -1671,16 +1962,14 @@ QDF_STATUS qdf_module_param_handler(void *context, const char *key,
|
|||||||
/**
|
/**
|
||||||
* qdf_logging_init() - Initialize msg logging functionality
|
* qdf_logging_init() - Initialize msg logging functionality
|
||||||
*
|
*
|
||||||
*
|
* Return: void
|
||||||
* Return : void
|
|
||||||
*/
|
*/
|
||||||
void qdf_logging_init(void);
|
void qdf_logging_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_logging_exit() - Cleanup msg logging functionality
|
* qdf_logging_exit() - Cleanup msg logging functionality
|
||||||
*
|
*
|
||||||
*
|
* Return: void
|
||||||
* Return : void
|
|
||||||
*/
|
*/
|
||||||
void qdf_logging_exit(void);
|
void qdf_logging_exit(void);
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -259,8 +259,8 @@ void qdf_trace_dp_del_reg_write(uint8_t srng_id, uint32_t enq_val,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_trace_dp_ce_tasklet_sched_lat_enabled() - Get the dp_ce_tasklet_sched_lat
|
* qdf_trace_dp_ce_tasklet_sched_latency_enabled() - Get the
|
||||||
* tracepoint enabled or disabled state
|
* dp_ce_tasklet_sched_latency tracepoint enabled or disabled state
|
||||||
*
|
*
|
||||||
* Return: True if the tracepoint is enabled else false
|
* Return: True if the tracepoint is enabled else false
|
||||||
*/
|
*/
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -304,6 +304,7 @@ static inline void __qdf_trace_hexdump_dummy(QDF_MODULE_ID module,
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* WLAN_WARN_ON_ASSERT */
|
#endif /* WLAN_WARN_ON_ASSERT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_trace_msg()- logging API
|
* qdf_trace_msg()- logging API
|
||||||
* @module: Module identifier. A member of the QDF_MODULE_ID enumeration that
|
* @module: Module identifier. A member of the QDF_MODULE_ID enumeration that
|
||||||
@@ -320,8 +321,6 @@ static inline void __qdf_trace_hexdump_dummy(QDF_MODULE_ID module,
|
|||||||
* tracing is enabled.
|
* tracing is enabled.
|
||||||
*
|
*
|
||||||
* Return: nothing
|
* Return: nothing
|
||||||
*
|
|
||||||
* implemented in qdf_trace.c
|
|
||||||
*/
|
*/
|
||||||
void __printf(3, 4) qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
|
void __printf(3, 4) qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
|
||||||
const char *str_format, ...);
|
const char *str_format, ...);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -197,10 +197,10 @@ bool __qdf_trace_dp_tx_comp_generic_ip_pkt_enabled(void)
|
|||||||
* __qdf_trace_dp_tx_comp_generic_ip_pkt() - Trace generic ip packet in
|
* __qdf_trace_dp_tx_comp_generic_ip_pkt() - Trace generic ip packet in
|
||||||
* tx direction
|
* tx direction
|
||||||
* @skb: pointer to network buffer
|
* @skb: pointer to network buffer
|
||||||
|
* @ip_proto: IP protocol field
|
||||||
* @ip_id: ip identification field
|
* @ip_id: ip identification field
|
||||||
* @trans_hdr_4_bytes: transport header first 4 bytes
|
* @trans_hdr_4_bytes: transport header first 4 bytes
|
||||||
* @latency: latency
|
* @latency: latency
|
||||||
|
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
@@ -217,7 +217,7 @@ void __qdf_trace_dp_tx_comp_generic_ip_pkt(struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __qdf_trace_dp_rx_pkt_enablei() - Get the dp_rx_pkt tracepoint
|
* __qdf_trace_dp_rx_pkt_enabled() - Get the dp_rx_pkt tracepoint
|
||||||
* enabled or disabled state
|
* enabled or disabled state
|
||||||
*
|
*
|
||||||
* Return: True if the tracepoint is enabled else false
|
* Return: True if the tracepoint is enabled else false
|
||||||
|
@@ -135,16 +135,7 @@ static char qdf_module_param[QDF_PARAM_MAX][QDF_PARAM_STR_LENGTH] = {
|
|||||||
"qdf_log_flush_timer_period",
|
"qdf_log_flush_timer_period",
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
/**
|
|
||||||
* qdf_snprintf() - wrapper function to snprintf
|
|
||||||
* @str_buffer: string Buffer
|
|
||||||
* @size: defines the size of the data record
|
|
||||||
* @str_format: Format string in which the message to be logged. This format
|
|
||||||
* string contains printf-like replacement parameters, which follow
|
|
||||||
* this parameter in the variable argument list.
|
|
||||||
*
|
|
||||||
* Return: num of bytes written to buffer
|
|
||||||
*/
|
|
||||||
int qdf_snprintf(char *str_buffer, unsigned int size, char *str_format, ...)
|
int qdf_snprintf(char *str_buffer, unsigned int size, char *str_format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -160,21 +151,6 @@ qdf_export_symbol(qdf_snprintf);
|
|||||||
|
|
||||||
#ifdef QDF_ENABLE_TRACING
|
#ifdef QDF_ENABLE_TRACING
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_msg() - externally called trace function
|
|
||||||
* @module: Module identifier a member of the QDF_MODULE_ID
|
|
||||||
* enumeration that identifies the module issuing the trace message.
|
|
||||||
* @level: Trace level a member of the QDF_TRACE_LEVEL enumeration
|
|
||||||
* indicating the severity of the condition causing the trace message
|
|
||||||
* to be issued. More severe conditions are more likely to be logged.
|
|
||||||
* @str_format: Format string in which the message to be logged. This format
|
|
||||||
* string contains printf-like replacement parameters, which follow
|
|
||||||
* this parameter in the variable argument list.
|
|
||||||
*
|
|
||||||
* Checks the level of severity and accordingly prints the trace messages
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
|
void qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
|
||||||
const char *str_format, ...)
|
const char *str_format, ...)
|
||||||
{
|
{
|
||||||
@@ -264,25 +240,6 @@ static inline QDF_STATUS allocate_g_qdf_trace_tbl_buffer(void)
|
|||||||
static inline void free_g_qdf_trace_tbl_buffer(void)
|
static inline void free_g_qdf_trace_tbl_buffer(void)
|
||||||
{ }
|
{ }
|
||||||
#endif
|
#endif
|
||||||
/**
|
|
||||||
* qdf_trace_enable() - Enable MTRACE for specific modules
|
|
||||||
* @bitmask_of_module_id: Bitmask according to enum of the modules.
|
|
||||||
* 32[dec] = 0010 0000 [bin] <enum of HDD is 5>
|
|
||||||
* 64[dec] = 0100 0000 [bin] <enum of SME is 6>
|
|
||||||
* 128[dec] = 1000 0000 [bin] <enum of PE is 7>
|
|
||||||
* @enable: can be true or false true implies enabling MTRACE false implies
|
|
||||||
* disabling MTRACE.
|
|
||||||
*
|
|
||||||
* Enable MTRACE for specific modules whose bits are set in bitmask and enable
|
|
||||||
* is true. if enable is false it disables MTRACE for that module. set the
|
|
||||||
* bitmask according to enum value of the modules.
|
|
||||||
* This functions will be called when you issue ioctl as mentioned following
|
|
||||||
* [iwpriv wlan0 setdumplog <value> <enable>].
|
|
||||||
* <value> - Decimal number, i.e. 64 decimal value shows only SME module,
|
|
||||||
* 128 decimal value shows only PE module, 192 decimal value shows PE and SME.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_enable(uint32_t bitmask_of_module_id, uint8_t enable)
|
void qdf_trace_enable(uint32_t bitmask_of_module_id, uint8_t enable)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -322,14 +279,6 @@ void qdf_trace_enable(uint32_t bitmask_of_module_id, uint8_t enable)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_trace_enable);
|
qdf_export_symbol(qdf_trace_enable);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_init() - initializes qdf trace structures and variables
|
|
||||||
*
|
|
||||||
* Called immediately after cds_preopen, so that we can start recording HDD
|
|
||||||
* events ASAP.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_init(void)
|
void qdf_trace_init(void)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@@ -350,14 +299,6 @@ void qdf_trace_init(void)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_trace_init);
|
qdf_export_symbol(qdf_trace_init);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_deinit() - frees memory allocated dynamically
|
|
||||||
*
|
|
||||||
* Called from cds_deinit, so that we can free the memory and resets
|
|
||||||
* the variables
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_deinit(void)
|
void qdf_trace_deinit(void)
|
||||||
{
|
{
|
||||||
g_qdf_trace_data.enable = false;
|
g_qdf_trace_data.enable = false;
|
||||||
@@ -370,19 +311,6 @@ void qdf_trace_deinit(void)
|
|||||||
|
|
||||||
qdf_export_symbol(qdf_trace_deinit);
|
qdf_export_symbol(qdf_trace_deinit);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace() - puts the messages in to ring-buffer
|
|
||||||
* @module: Enum of module, basically module id.
|
|
||||||
* @code: Code to be recorded
|
|
||||||
* @session: Session ID of the log
|
|
||||||
* @data: Actual message contents
|
|
||||||
*
|
|
||||||
* This function will be called from each module who wants record the messages
|
|
||||||
* in circular queue. Before calling this functions make sure you have
|
|
||||||
* registered your module with qdf through qdf_trace_register function.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace(uint8_t module, uint16_t code, uint16_t session, uint32_t data)
|
void qdf_trace(uint8_t module, uint16_t code, uint16_t session, uint32_t data)
|
||||||
{
|
{
|
||||||
tp_qdf_trace_record rec = NULL;
|
tp_qdf_trace_record rec = NULL;
|
||||||
@@ -465,14 +393,6 @@ void qdf_mtrace(QDF_MODULE_ID src_module, QDF_MODULE_ID dst_module,
|
|||||||
|
|
||||||
qdf_export_symbol(qdf_mtrace);
|
qdf_export_symbol(qdf_mtrace);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_spin_lock_init() - initializes the lock variable before use
|
|
||||||
*
|
|
||||||
* This function will be called from cds_alloc_global_context, we will have lock
|
|
||||||
* available to use ASAP
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
QDF_STATUS qdf_trace_spin_lock_init(void)
|
QDF_STATUS qdf_trace_spin_lock_init(void)
|
||||||
{
|
{
|
||||||
spin_lock_init(<race_lock);
|
spin_lock_init(<race_lock);
|
||||||
@@ -481,19 +401,6 @@ QDF_STATUS qdf_trace_spin_lock_init(void)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_trace_spin_lock_init);
|
qdf_export_symbol(qdf_trace_spin_lock_init);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_register() - registers the call back functions
|
|
||||||
* @module_iD: enum value of module
|
|
||||||
* @qdf_trace_callback: call back functions to display the messages in
|
|
||||||
* particular format.
|
|
||||||
*
|
|
||||||
* Registers the call back functions to display the messages in particular
|
|
||||||
* format mentioned in these call back functions. This functions should be
|
|
||||||
* called by interested module in their init part as we will be ready to
|
|
||||||
* register as soon as modules are up.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_register(QDF_MODULE_ID module_id,
|
void qdf_trace_register(QDF_MODULE_ID module_id,
|
||||||
tp_qdf_trace_cb qdf_trace_callback)
|
tp_qdf_trace_cb qdf_trace_callback)
|
||||||
{
|
{
|
||||||
@@ -501,26 +408,6 @@ void qdf_trace_register(QDF_MODULE_ID module_id,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_trace_register);
|
qdf_export_symbol(qdf_trace_register);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_dump_all() - Dump data from ring buffer via call back functions
|
|
||||||
* registered with QDF
|
|
||||||
* @p_mac: Context of particular module
|
|
||||||
* @code: Reason code
|
|
||||||
* @session: Session id of log
|
|
||||||
* @count: Number of lines to dump starting from tail to head
|
|
||||||
*
|
|
||||||
* This function will be called up on issuing ioctl call as mentioned following
|
|
||||||
* [iwpriv wlan0 dumplog 0 0 <n> <bitmask_of_module>]
|
|
||||||
*
|
|
||||||
* <n> - number lines to dump starting from tail to head.
|
|
||||||
*
|
|
||||||
* <bitmask_of_module> - if anybody wants to know how many messages were
|
|
||||||
* recorded for particular module/s mentioned by setbit in bitmask from last
|
|
||||||
* <n> messages. It is optional, if you don't provide then it will dump
|
|
||||||
* everything from buffer.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_dump_all(void *p_mac, uint8_t code, uint8_t session,
|
void qdf_trace_dump_all(void *p_mac, uint8_t code, uint8_t session,
|
||||||
uint32_t count, uint32_t bitmask_of_module)
|
uint32_t count, uint32_t bitmask_of_module)
|
||||||
{
|
{
|
||||||
@@ -606,12 +493,6 @@ qdf_export_symbol(qdf_trace_dump_all);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_MEMDUMP_ENABLE
|
#ifdef WLAN_FEATURE_MEMDUMP_ENABLE
|
||||||
/**
|
|
||||||
* qdf_register_debugcb_init() - initializes debug callbacks
|
|
||||||
* to NULL
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_register_debugcb_init(void)
|
void qdf_register_debugcb_init(void)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@@ -621,17 +502,6 @@ void qdf_register_debugcb_init(void)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_register_debugcb_init);
|
qdf_export_symbol(qdf_register_debugcb_init);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_register_debug_callback() - stores callback handlers to print
|
|
||||||
* state information
|
|
||||||
* @module_id: module id of layer
|
|
||||||
* @qdf_state_infocb: callback to be registered
|
|
||||||
*
|
|
||||||
* This function is used to store callback handlers to print
|
|
||||||
* state information
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_register_debug_callback(QDF_MODULE_ID module_id,
|
void qdf_register_debug_callback(QDF_MODULE_ID module_id,
|
||||||
tp_qdf_state_info_cb qdf_state_infocb)
|
tp_qdf_state_info_cb qdf_state_infocb)
|
||||||
{
|
{
|
||||||
@@ -639,15 +509,6 @@ void qdf_register_debug_callback(QDF_MODULE_ID module_id,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_register_debug_callback);
|
qdf_export_symbol(qdf_register_debug_callback);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_state_info_dump_all() - it invokes callback of layer which registered
|
|
||||||
* its callback to print its state information.
|
|
||||||
* @buf: buffer pointer to be passed
|
|
||||||
* @size: size of buffer to be filled
|
|
||||||
* @driver_dump_size: actual size of buffer used
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success
|
|
||||||
*/
|
|
||||||
QDF_STATUS qdf_state_info_dump_all(char *buf, uint16_t size,
|
QDF_STATUS qdf_state_info_dump_all(char *buf, uint16_t size,
|
||||||
uint16_t *driver_dump_size)
|
uint16_t *driver_dump_size)
|
||||||
{
|
{
|
||||||
@@ -713,24 +574,6 @@ static void qdf_dp_unused(struct qdf_dp_trace_record_s *record,
|
|||||||
__func__);
|
__func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_init() - enables the DP trace
|
|
||||||
* @live_mode_config: live mode configuration
|
|
||||||
* @thresh: high throughput threshold for disabling live mode
|
|
||||||
* @thresh_time_limit: max time to wait before deciding if thresh is crossed
|
|
||||||
* @verbosity: dptrace verbosity level
|
|
||||||
* @proto_bitmap: bitmap to enable/disable specific protocols
|
|
||||||
*
|
|
||||||
* Called during driver load to init dptrace
|
|
||||||
*
|
|
||||||
* A brief note on the 'thresh' param -
|
|
||||||
* Total # of packets received in a bandwidth timer interval beyond which
|
|
||||||
* DP Trace logging for data packets (including ICMP) will be disabled.
|
|
||||||
* In memory logging will still continue for these packets. Other packets for
|
|
||||||
* which proto.bitmap is set will continue to be recorded in logs and in memory.
|
|
||||||
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_init(bool live_mode_config, uint8_t thresh,
|
void qdf_dp_trace_init(bool live_mode_config, uint8_t thresh,
|
||||||
uint16_t time_limit, uint8_t verbosity,
|
uint16_t time_limit, uint8_t verbosity,
|
||||||
uint32_t proto_bitmap)
|
uint32_t proto_bitmap)
|
||||||
@@ -800,14 +643,7 @@ void qdf_dp_trace_deinit(void)
|
|||||||
|
|
||||||
free_g_qdf_dp_trace_tbl_buffer();
|
free_g_qdf_dp_trace_tbl_buffer();
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* qdf_dp_trace_set_value() - Configure the value to control DP trace
|
|
||||||
* @proto_bitmap: defines the protocol to be tracked
|
|
||||||
* @no_of_records: defines the nth packet which is traced
|
|
||||||
* @verbosity: defines the verbosity level
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_set_value(uint32_t proto_bitmap, uint8_t no_of_record,
|
void qdf_dp_trace_set_value(uint32_t proto_bitmap, uint8_t no_of_record,
|
||||||
uint8_t verbosity)
|
uint8_t verbosity)
|
||||||
{
|
{
|
||||||
@@ -818,13 +654,6 @@ void qdf_dp_trace_set_value(uint32_t proto_bitmap, uint8_t no_of_record,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_set_value);
|
qdf_export_symbol(qdf_dp_trace_set_value);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_set_verbosity() - set verbosity value
|
|
||||||
*
|
|
||||||
* @val: Value to set
|
|
||||||
*
|
|
||||||
* Return: Null
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_set_verbosity(uint32_t val)
|
void qdf_dp_trace_set_verbosity(uint32_t val)
|
||||||
{
|
{
|
||||||
g_qdf_dp_trace_data.verbosity = val;
|
g_qdf_dp_trace_data.verbosity = val;
|
||||||
@@ -832,7 +661,7 @@ void qdf_dp_trace_set_verbosity(uint32_t val)
|
|||||||
qdf_export_symbol(qdf_dp_trace_set_verbosity);
|
qdf_export_symbol(qdf_dp_trace_set_verbosity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_get_verbosity) - get verbosity value
|
* qdf_dp_get_verbosity() - get verbosity value
|
||||||
*
|
*
|
||||||
* Return: int
|
* Return: int
|
||||||
*/
|
*/
|
||||||
@@ -842,13 +671,6 @@ uint8_t qdf_dp_get_verbosity(void)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_get_verbosity);
|
qdf_export_symbol(qdf_dp_get_verbosity);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_set_proto_bitmap() - set dp trace proto bitmap
|
|
||||||
*
|
|
||||||
* @val : unsigned bitmap to set
|
|
||||||
*
|
|
||||||
* Return: proto bitmap
|
|
||||||
*/
|
|
||||||
void qdf_dp_set_proto_bitmap(uint32_t val)
|
void qdf_dp_set_proto_bitmap(uint32_t val)
|
||||||
{
|
{
|
||||||
g_qdf_dp_trace_data.proto_bitmap = val;
|
g_qdf_dp_trace_data.proto_bitmap = val;
|
||||||
@@ -867,24 +689,12 @@ static uint32_t qdf_dp_get_proto_event_bitmap(void)
|
|||||||
return g_qdf_dp_trace_data.proto_event_bitmap;
|
return g_qdf_dp_trace_data.proto_event_bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_set_no_of_record() - set dp trace no_of_record
|
|
||||||
*
|
|
||||||
* @val : unsigned no_of_record to set
|
|
||||||
*
|
|
||||||
* Return: null
|
|
||||||
*/
|
|
||||||
void qdf_dp_set_no_of_record(uint32_t val)
|
void qdf_dp_set_no_of_record(uint32_t val)
|
||||||
{
|
{
|
||||||
g_qdf_dp_trace_data.no_of_record = val;
|
g_qdf_dp_trace_data.no_of_record = val;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_set_no_of_record);
|
qdf_export_symbol(qdf_dp_set_no_of_record);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_get_no_of_record() - get dp trace no_of_record
|
|
||||||
*
|
|
||||||
* Return: number of records
|
|
||||||
*/
|
|
||||||
uint8_t qdf_dp_get_no_of_record(void)
|
uint8_t qdf_dp_get_no_of_record(void)
|
||||||
{
|
{
|
||||||
return g_qdf_dp_trace_data.no_of_record;
|
return g_qdf_dp_trace_data.no_of_record;
|
||||||
@@ -929,11 +739,6 @@ static bool qdf_dp_trace_verbosity_check(enum QDF_DP_TRACE_ID code)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_get_proto_bitmap() - get dp trace proto bitmap
|
|
||||||
*
|
|
||||||
* Return: proto bitmap
|
|
||||||
*/
|
|
||||||
uint32_t qdf_dp_get_proto_bitmap(void)
|
uint32_t qdf_dp_get_proto_bitmap(void)
|
||||||
{
|
{
|
||||||
if (g_qdf_dp_trace_data.enable)
|
if (g_qdf_dp_trace_data.enable)
|
||||||
@@ -942,13 +747,6 @@ uint32_t qdf_dp_get_proto_bitmap(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_set_track() - Marks whether the packet needs to be traced
|
|
||||||
* @nbuf: defines the netbuf
|
|
||||||
* @dir: direction
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir)
|
void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir)
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
@@ -1176,7 +974,7 @@ static const char *qdf_dp_type_to_str(enum qdf_proto_type type)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dp_subtype_to_str() - convert packet subtype to string
|
* qdf_dp_subtype_to_str() - convert packet subtype to string
|
||||||
* @type: type
|
* @subtype: subtype
|
||||||
*
|
*
|
||||||
* Return: string version of packet subtype
|
* Return: string version of packet subtype
|
||||||
*/
|
*/
|
||||||
@@ -1656,18 +1454,6 @@ uint8_t *qdf_get_pkt_status_string(uint8_t status)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_log_proto_pkt_info() - Send diag log with pkt info
|
|
||||||
* @sa: Source MAC address
|
|
||||||
* @da: Destination MAC address
|
|
||||||
* @type: packet type
|
|
||||||
* @subtype: packet subtype
|
|
||||||
* @dir: tx or rx
|
|
||||||
* @msdu_id: MSDU id
|
|
||||||
* @status: status code
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void qdf_dp_log_proto_pkt_info(uint8_t *sa, uint8_t *da, uint8_t type,
|
void qdf_dp_log_proto_pkt_info(uint8_t *sa, uint8_t *da, uint8_t type,
|
||||||
uint8_t subtype, uint8_t dir, uint16_t msdu_id,
|
uint8_t subtype, uint8_t dir, uint16_t msdu_id,
|
||||||
uint8_t status)
|
uint8_t status)
|
||||||
@@ -2543,16 +2329,6 @@ void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_display_event_record);
|
qdf_export_symbol(qdf_dp_display_event_record);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_record_event() - record events
|
|
||||||
* @code: dptrace code
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
* @pdev_id: pdev_id
|
|
||||||
* @type: proto type
|
|
||||||
* @subtype: proto subtype
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_record_event(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
|
void qdf_dp_trace_record_event(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
|
||||||
uint8_t pdev_id, enum qdf_proto_type type,
|
uint8_t pdev_id, enum qdf_proto_type type,
|
||||||
enum qdf_proto_subtype subtype)
|
enum qdf_proto_subtype subtype)
|
||||||
@@ -2904,16 +2680,6 @@ qdf_dp_display_data_pkt_record(struct qdf_dp_trace_record_s *record,
|
|||||||
record->size);
|
record->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace() - Stores the data in buffer
|
|
||||||
* @nbuf : defines the netbuf
|
|
||||||
* @code : defines the event
|
|
||||||
* @pdev_id: pdev_id
|
|
||||||
* @data : defines the data to be stored
|
|
||||||
* @size : defines the size of the data record
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
||||||
uint8_t *data, uint8_t size, enum qdf_proto_dir dir)
|
uint8_t *data, uint8_t size, enum qdf_proto_dir dir)
|
||||||
{
|
{
|
||||||
@@ -2927,46 +2693,24 @@ void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code, uint8_t pdev_id,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace);
|
qdf_export_symbol(qdf_dp_trace);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_spin_lock_init() - initializes the lock variable before use
|
|
||||||
* This function will be called from cds_alloc_global_context, we will have lock
|
|
||||||
* available to use ASAP
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_spin_lock_init(void)
|
void qdf_dp_trace_spin_lock_init(void)
|
||||||
{
|
{
|
||||||
spin_lock_init(&l_dp_trace_lock);
|
spin_lock_init(&l_dp_trace_lock);
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_spin_lock_init);
|
qdf_export_symbol(qdf_dp_trace_spin_lock_init);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_disable_live_mode - disable live mode for dptrace
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_disable_live_mode(void)
|
void qdf_dp_trace_disable_live_mode(void)
|
||||||
{
|
{
|
||||||
g_qdf_dp_trace_data.force_live_mode = 0;
|
g_qdf_dp_trace_data.force_live_mode = 0;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_disable_live_mode);
|
qdf_export_symbol(qdf_dp_trace_disable_live_mode);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_enable_live_mode() - enable live mode for dptrace
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_enable_live_mode(void)
|
void qdf_dp_trace_enable_live_mode(void)
|
||||||
{
|
{
|
||||||
g_qdf_dp_trace_data.force_live_mode = 1;
|
g_qdf_dp_trace_data.force_live_mode = 1;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_enable_live_mode);
|
qdf_export_symbol(qdf_dp_trace_enable_live_mode);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_clear_buffer() - clear dp trace buffer
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_clear_buffer(void)
|
void qdf_dp_trace_clear_buffer(void)
|
||||||
{
|
{
|
||||||
g_qdf_dp_trace_data.head = INVALID_QDF_DP_TRACE_ADDR;
|
g_qdf_dp_trace_data.head = INVALID_QDF_DP_TRACE_ADDR;
|
||||||
@@ -3156,7 +2900,7 @@ static void qdf_dpt_display_ptr_record_debugfs(qdf_debugfs_file_t file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dpt_display_ptr_record_debugfs() - display record
|
* qdf_dpt_display_record_debugfs() - display record
|
||||||
* @file: file to read
|
* @file: file to read
|
||||||
* @record: dptrace record
|
* @record: dptrace record
|
||||||
* @index: index
|
* @index: index
|
||||||
@@ -3394,14 +3138,6 @@ QDF_STATUS qdf_dpt_dump_stats_debugfs(qdf_debugfs_file_t file,
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dpt_dump_stats_debugfs);
|
qdf_export_symbol(qdf_dpt_dump_stats_debugfs);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dpt_set_value_debugfs() - Configure the value to control DP trace
|
|
||||||
* @proto_bitmap: defines the protocol to be tracked
|
|
||||||
* @no_of_records: defines the nth packet which is traced
|
|
||||||
* @verbosity: defines the verbosity level
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dpt_set_value_debugfs(uint8_t proto_bitmap, uint8_t no_of_record,
|
void qdf_dpt_set_value_debugfs(uint8_t proto_bitmap, uint8_t no_of_record,
|
||||||
uint8_t verbosity, uint16_t num_records_to_dump)
|
uint8_t verbosity, uint16_t num_records_to_dump)
|
||||||
{
|
{
|
||||||
@@ -3415,14 +3151,6 @@ void qdf_dpt_set_value_debugfs(uint8_t proto_bitmap, uint8_t no_of_record,
|
|||||||
qdf_export_symbol(qdf_dpt_set_value_debugfs);
|
qdf_export_symbol(qdf_dpt_set_value_debugfs);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_dump_all() - Dump data from ring buffer via call back functions
|
|
||||||
* registered with QDF
|
|
||||||
* @count: Number of lines to dump starting from tail to head
|
|
||||||
* @pdev_id: pdev_id
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id)
|
void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id)
|
||||||
{
|
{
|
||||||
struct qdf_dp_trace_record_s p_record;
|
struct qdf_dp_trace_record_s p_record;
|
||||||
@@ -3489,22 +3217,6 @@ void qdf_dp_trace_dump_all(uint32_t count, uint8_t pdev_id)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_dp_trace_dump_all);
|
qdf_export_symbol(qdf_dp_trace_dump_all);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_dp_trace_throttle_live_mode() - Throttle DP Trace live mode
|
|
||||||
* @high_bw_request: whether this is a high BW req or not
|
|
||||||
*
|
|
||||||
* The function tries to prevent excessive logging into the live buffer by
|
|
||||||
* having an upper limit on number of packets that can be logged per second.
|
|
||||||
*
|
|
||||||
* The intention is to allow occasional pings and data packets and really low
|
|
||||||
* throughput levels while suppressing bursts and higher throughput levels so
|
|
||||||
* that we donot hog the live buffer.
|
|
||||||
*
|
|
||||||
* If the number of packets printed in a particular second exceeds the thresh,
|
|
||||||
* disable printing in the next second.
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_dp_trace_throttle_live_mode(bool high_bw_request)
|
void qdf_dp_trace_throttle_live_mode(bool high_bw_request)
|
||||||
{
|
{
|
||||||
static int bw_interval_counter;
|
static int bw_interval_counter;
|
||||||
@@ -3719,11 +3431,6 @@ struct category_name_info g_qdf_category_name[MAX_SUPPORTED_CATEGORY] = {
|
|||||||
};
|
};
|
||||||
qdf_export_symbol(g_qdf_category_name);
|
qdf_export_symbol(g_qdf_category_name);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_trace_display() - Display trace
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void qdf_trace_display(void)
|
void qdf_trace_display(void)
|
||||||
{
|
{
|
||||||
QDF_MODULE_ID module_id;
|
QDF_MODULE_ID module_id;
|
||||||
@@ -3760,15 +3467,6 @@ uint32_t qdf_rl_print_count = WLAN_MAX_LOGS_PER_SEC;
|
|||||||
uint32_t qdf_rl_print_time = 1;
|
uint32_t qdf_rl_print_time = 1;
|
||||||
uint32_t qdf_rl_print_suppressed;
|
uint32_t qdf_rl_print_suppressed;
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_detected_excessive_logging() - Excessive logging detected
|
|
||||||
*
|
|
||||||
* Track logging count using a quasi-tumbling window.
|
|
||||||
* If the max logging count for a given window is exceeded,
|
|
||||||
* return true else fails.
|
|
||||||
*
|
|
||||||
* Return: true/false
|
|
||||||
*/
|
|
||||||
bool qdf_detected_excessive_logging(void)
|
bool qdf_detected_excessive_logging(void)
|
||||||
{
|
{
|
||||||
qdf_time_t now = qdf_system_ticks();
|
qdf_time_t now = qdf_system_ticks();
|
||||||
|
Reference in New Issue
Block a user