wifi: rtw88: suppress messages of failed to flush queue
authorPing-Ke Shih <pkshih@realtek.com>
Thu, 18 Apr 2024 00:29:16 +0000 (08:29 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 22 Apr 2024 01:34:31 +0000 (09:34 +0800)
Driver throws messages when scanning with a lot of traffic, because packets
in TX buffer can not be transmitted in time. Since this is a common
occurrence, change them to debug message with special debug mask that
developers can turn on this mask by default for further analysis.

Cc: Lewis Robbins <lewis.robbins2@gmail.com>
Tested-by: Lewis Robbins <lewis.robbins2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240418002916.5965-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/debug.h
drivers/net/wireless/realtek/rtw88/mac.c
drivers/net/wireless/realtek/rtw88/pci.c

index f20c0471c82a4a3df0b6ed7291df837c9618687c..eb69006c463ed4b2cfac303bb7d8ceb340069a69 100644 (file)
@@ -26,6 +26,7 @@ enum rtw_debug_mask {
        RTW_DBG_STATE           = 0x00020000,
        RTW_DBG_SDIO            = 0x00040000,
 
+       RTW_DBG_UNEXP           = 0x80000000,
        RTW_DBG_ALL             = 0xffffffff
 };
 
index 699ae3048c6ba60948b1e810660fee84eeaae468..0dba8aae771603c0e4bd75e32485a168c1dc7e23 100644 (file)
@@ -1039,14 +1039,15 @@ static void __rtw_mac_flush_prio_queue(struct rtw_dev *rtwdev,
                msleep(20);
        }
 
-       /* priority queue is still not empty, throw a warning,
+       /* priority queue is still not empty, throw a debug message
         *
         * Note that if we want to flush the tx queue when having a lot of
         * traffic (ex, 100Mbps up), some of the packets could be dropped.
         * And it requires like ~2secs to flush the full priority queue.
         */
        if (!drop)
-               rtw_warn(rtwdev, "timed out to flush queue %d\n", prio_queue);
+               rtw_dbg(rtwdev, RTW_DBG_UNEXP,
+                       "timed out to flush queue %d\n", prio_queue);
 }
 
 static void rtw_mac_flush_prio_queues(struct rtw_dev *rtwdev,
index 9986a4cb37eb2b287afb50f48b731092c4d7b136..7a093f3d5f7422c7ce6532bec7fe085e3e57f37b 100644 (file)
@@ -729,7 +729,8 @@ static void __pci_flush_queue(struct rtw_dev *rtwdev, u8 pci_q, bool drop)
        }
 
        if (!drop)
-               rtw_warn(rtwdev, "timed out to flush pci tx ring[%d]\n", pci_q);
+               rtw_dbg(rtwdev, RTW_DBG_UNEXP,
+                       "timed out to flush pci tx ring[%d]\n", pci_q);
 }
 
 static void __rtw_pci_flush_queues(struct rtw_dev *rtwdev, u32 pci_queues,