wifi: rtw89: add UNEXP debug mask to keep monitor messages unexpected to happen frequ...
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 10 Jun 2022 07:26:06 +0000 (15:26 +0800)
committerKalle Valo <kvalo@kernel.org>
Tue, 21 Jun 2022 06:15:47 +0000 (09:15 +0300)
Some warning messages could bother users. With proper handling, these
situations don't really affect usage, but we still need to keep monitor
these messages. If they happen frequently, we must review driver or
hardware design to clarify.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220610072610.27095-8-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/debug.h
drivers/net/wireless/realtek/rtw89/pci.c

index f9c1e5f5c97d0a8bc4e2035f08e449d482c5ebee..447f95a91f07aabfd5d7a6b066d85208afd06c89 100644 (file)
@@ -1243,7 +1243,7 @@ static int rtw89_core_rx_process_phy_ppdu(struct rtw89_dev *rtwdev,
                                          struct rtw89_rx_phy_ppdu *phy_ppdu)
 {
        if (RTW89_GET_PHY_STS_LEN(phy_ppdu->buf) << 3 != phy_ppdu->len) {
-               rtw89_warn(rtwdev, "phy ppdu len mismatch\n");
+               rtw89_debug(rtwdev, RTW89_DBG_UNEXP, "phy ppdu len mismatch\n");
                return -EINVAL;
        }
        rtw89_core_update_phy_ppdu(phy_ppdu);
index 561b04faf703dbe49ee14f4b6feaffed5bfb8b1f..6176152dbf6bf03cbf62d0f310194a62288b97dc 100644 (file)
@@ -25,6 +25,8 @@ enum rtw89_debug_mask {
        RTW89_DBG_BF = BIT(14),
        RTW89_DBG_HW_SCAN = BIT(15),
        RTW89_DBG_SAR = BIT(16),
+
+       RTW89_DBG_UNEXP = BIT(31),
 };
 
 enum rtw89_debug_mac_reg_sel {
index 25872dfb4da1ccee6e60d5e88dd3e62f5ccb9d5a..fd5d9bde010855f3c2af995e246b4cbae2b347d6 100644 (file)
@@ -228,7 +228,8 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev,
 
        if (fs) {
                if (new) {
-                       rtw89_err(rtwdev, "skb should not be ready before first segment start\n");
+                       rtw89_debug(rtwdev, RTW89_DBG_UNEXP,
+                                   "skb should not be ready before first segment start\n");
                        goto err_sync_device;
                }
                if (desc_info->ready) {
@@ -251,7 +252,7 @@ static u32 rtw89_pci_rxbd_deliver_skbs(struct rtw89_dev *rtwdev,
        } else {
                offset = sizeof(struct rtw89_pci_rxbd_info);
                if (!new) {
-                       rtw89_warn(rtwdev, "no last skb\n");
+                       rtw89_debug(rtwdev, RTW89_DBG_UNEXP, "no last skb\n");
                        goto err_sync_device;
                }
        }
@@ -605,7 +606,7 @@ static void rtw89_pci_isr_rxd_unavail(struct rtw89_dev *rtwdev,
                hw_idx_next = (hw_idx + 1) % bd_ring->len;
 
                if (hw_idx_next == host_idx)
-                       rtw89_warn(rtwdev, "%d RXD unavailable\n", i);
+                       rtw89_debug(rtwdev, RTW89_DBG_UNEXP, "%d RXD unavailable\n", i);
 
                rtw89_debug(rtwdev, RTW89_DBG_TXRX,
                            "%d RXD unavailable, idx=0x%08x, len=%d\n",