diff mbox series

wifi: ath12k: fix debug messages

Message ID 20231003150132.187875-1-kvalo@kernel.org (mailing list archive)
State Accepted
Commit 453a62a3ee65aeba6e69bfd09227fc2f19290bea
Delegated to: Kalle Valo
Headers show
Series wifi: ath12k: fix debug messages | expand

Commit Message

Kalle Valo Oct. 3, 2023, 3:01 p.m. UTC
From: Kalle Valo <quic_kvalo@quicinc.com>

In ath12k the debug messages were broken, no matter setting what value to the
debug_mask module parameter would not get the debug messages printed. The issue
is that __ath12k_dbg() uses dev_dbg() to print the debug messages which requires either enabling
CONFIG_DYNAMIC_DEBUG or DEBUG symbol in the driver.

ath12k is supposed to use debug_mask module to control whether debug messages
are printed or not. Using both CONFIG_DYNAMIC_DEBUG and debug_mask parameter
does not make any sense so switch to using dev_printk(), just like ath11k does.
Now it's enough just to debug_mask module parameter to get the debug messages.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 140accd3f29eee6507f8a51bc38e85c119aedf14

Comments

Jeff Johnson Oct. 3, 2023, 3:54 p.m. UTC | #1
On 10/3/2023 8:01 AM, Kalle Valo wrote:
> From: Kalle Valo <quic_kvalo@quicinc.com>
> 
> In ath12k the debug messages were broken, no matter setting what value to the
> debug_mask module parameter would not get the debug messages printed. The issue
> is that __ath12k_dbg() uses dev_dbg() to print the debug messages which requires either enabling
> CONFIG_DYNAMIC_DEBUG or DEBUG symbol in the driver.
> 
> ath12k is supposed to use debug_mask module to control whether debug messages
> are printed or not. Using both CONFIG_DYNAMIC_DEBUG and debug_mask parameter
> does not make any sense so switch to using dev_printk(), just like ath11k does.
> Now it's enough just to debug_mask module parameter to get the debug messages.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Kalle Valo Oct. 5, 2023, 6:24 a.m. UTC | #2
Kalle Valo <kvalo@kernel.org> wrote:

> In ath12k the debug messages were broken, no matter setting what value to the
> debug_mask module parameter would not get the debug messages printed. The issue
> is that __ath12k_dbg() uses dev_dbg() to print the debug messages which requires either enabling
> CONFIG_DYNAMIC_DEBUG or DEBUG symbol in the driver.
> 
> ath12k is supposed to use debug_mask module to control whether debug messages
> are printed or not. Using both CONFIG_DYNAMIC_DEBUG and debug_mask parameter
> does not make any sense so switch to using dev_printk(), just like ath11k does.
> Now it's enough just to debug_mask module parameter to get the debug messages.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

453a62a3ee65 wifi: ath12k: fix debug messages
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/debug.c b/drivers/net/wireless/ath/ath12k/debug.c
index 67893923e010..45d33279e665 100644
--- a/drivers/net/wireless/ath/ath12k/debug.c
+++ b/drivers/net/wireless/ath/ath12k/debug.c
@@ -64,7 +64,7 @@  void __ath12k_dbg(struct ath12k_base *ab, enum ath12k_debug_mask mask,
 	vaf.va = &args;
 
 	if (ath12k_debug_mask & mask)
-		dev_dbg(ab->dev, "%pV", &vaf);
+		dev_printk(KERN_DEBUG, ab->dev, "%pV", &vaf);
 
 	/* TODO: trace log */