summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/core.h
diff options
context:
space:
mode:
authorSeevalamuthu Mariappan <quic_seevalam@quicinc.com>2022-01-31 16:16:44 +0200
committerKalle Valo <quic_kvalo@quicinc.com>2022-02-01 12:56:14 +0200
commitf295ad912910e08d9b887a0c952f82d9612459d4 (patch)
treeea96875e587d0bc93bf4cd81b7cba8c45c42a393 /drivers/net/wireless/ath/ath11k/core.h
parent02a95374b5eebdbd3b6413fd7ddec151d2ea75a1 (diff)
ath11k: Add debugfs interface to configure firmware debug log level
Add debugfs interface "fw_dbglog_config" to configure firmware log level. Configuration is done via WMI command WMI_DBGLOG_CFG_CMDID. Command to configure, echo "<dbglog_param> <values>" > /sys/kernel/debug/ath11k/<hw>/macX/fw_dbglog_config where dbglog_param can be, 1) WMI_DEBUG_LOG_PARAM_LOG_LEVEL - configure log level for a given module here, <values> = <0xaaaa00bb>, 'aaaa' - module id and 'bb' - loglevel 2) WMI_DEBUG_LOG_PARAM_VDEV_ENABLE - enable debug log for a given vdev here, <values> = vdev_id 3) WMI_DEBUG_LOG_PARAM_VDEV_DISABLE - disable debug log for a given vdev except ERROR logs here, <values> = vdev_id 4) WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP - set vdev enable bitmap here, <values> = vdev_enable_bitmap 5) WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP - set a given log level to all the modules specified in the module bitmap. Command to configure for this log param, $ echo "5 <values> <module_id_index> <is_end>" > /sys/kernel/debug/ath11k/<hw>/macX/fw_dbglog_config here, <values> = <0xaaaaaaaa000000bb>, 'aaaaaaaa' - module bitmap and 'bb' - loglevel <module_id_index> = index of module bitmap. Max module id is 512. So, module_id_index is 0-15. <is_end> = to indicate if more configuration to follow. 6) WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP - Wow mode specific logging enable. Command to configure for this log param, $ echo "6 <values> <module_id_index> <is_end>" > /sys/kernel/debug/ath11k/<hw>/macX/fw_dbglog_config here, <values> = <0xaaaaaaaa000000bb>, 'aaaaaaaa' - module bitmap and 'bb' - loglevel <module_id_index> = index of module bitmap. Max module id is 512. So, module_id_index is 0-15. <is_end> = to indicate if more configuration to follow. Sample command usage, To enable module WLAN_MODULE_WMI and log level ATH11K_FW_DBGLOG_VERBOSE, echo "1 0x10001" > /sys/kernel/debug/ath11k/<hw>/macX/fw_dbglog_config To enable module bit map from 32 to 63 and log level ATH11K_FW_DBGLOG_VERBOSE, echo "5 0xffffffff00000001 1 1" > /sys/kernel/debug/ath11k/<hw>/macX/fw_dbglog_config Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01734-QCAHKSWPL_SILICONZ-1 Signed-off-by: Seevalamuthu Mariappan <quic_seevalam@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/1642405103-32302-1-git-send-email-quic_seevalam@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/core.h')
-rw-r--r--drivers/net/wireless/ath/ath11k/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index 4eda15c56b04..08d30f9d25c3 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -441,6 +441,8 @@ struct ath11k_dbg_htt_stats {
spinlock_t lock;
};
+#define MAX_MODULE_ID_BITMAP_WORDS 16
+
struct ath11k_debug {
struct dentry *debugfs_pdev;
struct ath11k_dbg_htt_stats htt_stats;
@@ -454,6 +456,8 @@ struct ath11k_debug {
u32 pktlog_peer_valid;
u8 pktlog_peer_addr[ETH_ALEN];
u32 rx_filter;
+ u32 mem_offset;
+ u32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
};
struct ath11k_per_peer_tx_stats {