From fcddf4b6a86b6bf484ae2a200114230563f17e9d Mon Sep 17 00:00:00 2001 From: Balamurugan Selvarajan Date: Sat, 20 Aug 2022 14:43:05 +0530 Subject: [PATCH] ath12k: Introduced module param for enabling fwlog Introduced module param for enabling fwlog. By default, fw logging is disabled. This eventually reduces the CE interrupts which helps in gaining CPU IDLE by 2%. Signed-off-by: Balamurugan Selvarajan --- drivers/net/wireless/ath/ath12k/core.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -35,6 +35,10 @@ unsigned int ath12k_mlo_capable = true; module_param_named(mlo_capable, ath12k_mlo_capable, uint, 0644); MODULE_PARM_DESC(mlo_capable, "mlo capable: 0-disable, 1-enable"); +static unsigned int ath12k_en_fwlog = true; +module_param_named(en_fwlog, ath12k_en_fwlog, uint, 0644); +MODULE_PARM_DESC(en_fwlog, "fwlog: 0-disable, 1-enable"); + static DEFINE_MUTEX(ath12k_hw_lock); static struct list_head ath12k_hw_groups = LIST_HEAD_INIT(ath12k_hw_groups); @@ -881,11 +885,13 @@ static int ath12k_core_hw_group_start(st ath12k_config_qdss(ab); - ret = ath12k_enable_fwlog(ab); - if (ret < 0) { - mutex_unlock(&ab->core_lock); - ath12k_err(ab, "failed to enable fwlog: %d\n", ret); - goto pdev_cleanup; + if (ath12k_en_fwlog == true) { + ret = ath12k_enable_fwlog(ab); + if (ret < 0) { + mutex_unlock(&ab->core_lock); + ath12k_err(ab, "failed to enable fwlog: %d\n", ret); + goto pdev_cleanup; + } } set_bit(ATH12K_FLAG_REGISTERED, &ab->dev_flags);