wifi: rtw89: debug: add FW log component for scan
authorPo-Hao Huang <phhuang@realtek.com>
Fri, 26 Jan 2024 06:33:51 +0000 (14:33 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 1 Feb 2024 10:20:24 +0000 (12:20 +0200)
This allows scan related logs when FW log debug mode is on.

Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240126063356.17857-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h

index e49360e29faf3150cd9ab3ad6849131925003367..43fe9333d3e754789f33d8891723ab67bad461e9 100644 (file)
@@ -1829,10 +1829,14 @@ fail:
 int rtw89_fw_h2c_fw_log(struct rtw89_dev *rtwdev, bool enable)
 {
        struct sk_buff *skb;
-       u32 comp = enable ? BIT(RTW89_FW_LOG_COMP_INIT) | BIT(RTW89_FW_LOG_COMP_TASK) |
-                           BIT(RTW89_FW_LOG_COMP_PS) | BIT(RTW89_FW_LOG_COMP_ERROR) : 0;
+       u32 comp = 0;
        int ret;
 
+       if (enable)
+               comp = BIT(RTW89_FW_LOG_COMP_INIT) | BIT(RTW89_FW_LOG_COMP_TASK) |
+                      BIT(RTW89_FW_LOG_COMP_PS) | BIT(RTW89_FW_LOG_COMP_ERROR) |
+                      BIT(RTW89_FW_LOG_COMP_SCAN);
+
        skb = rtw89_fw_h2c_alloc_skb_with_hdr(rtwdev, H2C_LOG_CFG_LEN);
        if (!skb) {
                rtw89_err(rtwdev, "failed to alloc skb for fw log cfg\n");
index 2c94d82d384cd81d3170160772b6bdb2d8b7b9a9..cb5b7bf88177442fa1d1977499c0c4bee54c7454 100644 (file)
@@ -149,6 +149,7 @@ enum rtw89_fw_log_comp {
        RTW89_FW_LOG_COMP_TWT,
        RTW89_FW_LOG_COMP_RF,
        RTW89_FW_LOG_COMP_MCC = 20,
+       RTW89_FW_LOG_COMP_SCAN = 28,
 };
 
 enum rtw89_pkt_offload_op {