From 0a609e036b7f4a0dfd375dfcce4dffcb5f5a6150 Mon Sep 17 00:00:00 2001 From: Patrick Yavitz Date: Fri, 21 Jul 2023 17:13:56 -0400 Subject: [PATCH] rtw88: decrease the log level of tx report Reduce 'failed to get tx report from firmware' dmesg spam. https://lore.kernel.org/linux-wireless/20210713104524.47101-1-pkshih@realtek.com/ https://cgit.freebsd.org/src/commit/?id=e140d551b78670fbf99c83a59438cb13de50420f Signed-off-by: Patrick Yavitz --- drivers/net/wireless/realtek/rtw88/tx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c index 2821119dc930..867a1c44dca1 100644 --- a/drivers/net/wireless/realtek/rtw88/tx.c +++ b/drivers/net/wireless/realtek/rtw88/tx.c @@ -177,14 +177,16 @@ void rtw_tx_report_purge_timer(struct timer_list *t) struct rtw_tx_report *tx_report = &rtwdev->tx_report; unsigned long flags; - if (skb_queue_len(&tx_report->queue) == 0) - return; - - rtw_warn(rtwdev, "failed to get tx report from firmware\n"); + uint32_t qlen; spin_lock_irqsave(&tx_report->q_lock, flags); - skb_queue_purge(&tx_report->queue); + qlen = skb_queue_len(&tx_report->queue); + if (qlen > 0) + skb_queue_purge(&tx_report->queue); spin_unlock_irqrestore(&tx_report->q_lock, flags); + + rtw_dbg(rtwdev, RTW_DBG_TX, "failed to get tx report from firmware: " + "txreport qlen %u\n", qlen); } void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) -- 2.39.2