diff mbox series

[1/1] rtw88: reduce the log level for failure of tx report

Message ID 20210126074926.160794-2-kai.heng.feng@canonical.com
State New
Headers show
Series Remove scary stack trace from Realtek WiFi driver | expand

Commit Message

Kai-Heng Feng Jan. 26, 2021, 7:49 a.m. UTC
From: Chin-Yen Lee <timlee@realtek.com>

BugLink: https://bugs.launchpad.net/bugs/1913263

Sometimes driver does not get tx report from firmware because wifi
environment is too noisy to get ack from AP about a TX frame,
or firmware is too busy to report driver in a estimated time.
But the condition will not affect wifi function or throughput.
So we reduce the log level to rtw_debug instead of scary backtrace.

Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201228082433.16431-1-pkshih@realtek.com
(cherry picked from commit ac9533d2a637464588c03d1a247567ea95d2bc59 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/wireless/realtek/rtw88/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Bader Jan. 26, 2021, 8:38 a.m. UTC | #1
On 26.01.21 08:49, Kai-Heng Feng wrote:
> From: Chin-Yen Lee <timlee@realtek.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1913263
> 
> Sometimes driver does not get tx report from firmware because wifi
> environment is too noisy to get ack from AP about a TX frame,
> or firmware is too busy to report driver in a estimated time.
> But the condition will not affect wifi function or throughput.
> So we reduce the log level to rtw_debug instead of scary backtrace.
> 
> Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> Link: https://lore.kernel.org/r/20201228082433.16431-1-pkshih@realtek.com
> (cherry picked from commit ac9533d2a637464588c03d1a247567ea95d2bc59 linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/net/wireless/realtek/rtw88/tx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
> index ca8072177ae38..18ec0088bf416 100644
> --- a/drivers/net/wireless/realtek/rtw88/tx.c
> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
> @@ -158,7 +158,7 @@ void rtw_tx_report_purge_timer(struct timer_list *t)
>  	if (skb_queue_len(&tx_report->queue) == 0)
>  		return;
>  
> -	WARN(1, "purge skb(s) not reported by firmware\n");
> +	rtw_dbg(rtwdev, RTW_DBG_TX, "purge skb(s) not reported by firmware\n");
>  
>  	spin_lock_irqsave(&tx_report->q_lock, flags);
>  	skb_queue_purge(&tx_report->queue);
>
Guilherme G. Piccoli Jan. 26, 2021, 10:53 a.m. UTC | #2
On 26/01/2021 04:49, Kai-Heng Feng wrote:
> From: Chin-Yen Lee <timlee@realtek.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1913263
> 
> Sometimes driver does not get tx report from firmware because wifi
> environment is too noisy to get ack from AP about a TX frame,
> or firmware is too busy to report driver in a estimated time.
> But the condition will not affect wifi function or throughput.
> So we reduce the log level to rtw_debug instead of scary backtrace.
> 
> Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> Link: https://lore.kernel.org/r/20201228082433.16431-1-pkshih@realtek.com
> (cherry picked from commit ac9533d2a637464588c03d1a247567ea95d2bc59 linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/net/wireless/realtek/rtw88/tx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
> index ca8072177ae38..18ec0088bf416 100644
> --- a/drivers/net/wireless/realtek/rtw88/tx.c
> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
> @@ -158,7 +158,7 @@ void rtw_tx_report_purge_timer(struct timer_list *t)
>  	if (skb_queue_len(&tx_report->queue) == 0)
>  		return;
>  
> -	WARN(1, "purge skb(s) not reported by firmware\n");
> +	rtw_dbg(rtwdev, RTW_DBG_TX, "purge skb(s) not reported by firmware\n");
>  
>  	spin_lock_irqsave(&tx_report->q_lock, flags);
>  	skb_queue_purge(&tx_report->queue);
> 

Thanks! It's a simple cherry-pick, and seems very effective in
preventing people to panic due to an alarming message!


Acked-by: Guilherme G. Piccoli <gpiccoli@canonical.com>
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
index ca8072177ae38..18ec0088bf416 100644
--- a/drivers/net/wireless/realtek/rtw88/tx.c
+++ b/drivers/net/wireless/realtek/rtw88/tx.c
@@ -158,7 +158,7 @@  void rtw_tx_report_purge_timer(struct timer_list *t)
 	if (skb_queue_len(&tx_report->queue) == 0)
 		return;
 
-	WARN(1, "purge skb(s) not reported by firmware\n");
+	rtw_dbg(rtwdev, RTW_DBG_TX, "purge skb(s) not reported by firmware\n");
 
 	spin_lock_irqsave(&tx_report->q_lock, flags);
 	skb_queue_purge(&tx_report->queue);