2023-10-12 14:02:20

by Chukun Pan

[permalink] [raw]
Subject: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail

The rtw88 driver throws a useless Call Trace when the rtl8812bu
or rtl8822be wifi modules fail to write the RF mode table.
Since this does not affect normal use of the wifi modules,
replace WARN() with driver warning to avoid useless panic.

Signed-off-by: Chukun Pan <[email protected]>
---
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 3017a9760da8..06b6efcd16d2 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -820,8 +820,10 @@ static void rtw8822b_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path,
break;
}

- if (WARN(counter <= 0, "write RF mode table fail\n"))
+ if (counter <= 0) {
+ rtw_warn(rtwdev, "write RF mode table fail\n");
return;
+ }

rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWE, RFREG_MASK, 0x80000);
rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWA, RFREG_MASK, 0x00001);
--
2.25.1


2023-10-22 09:22:11

by Chukun Pan

[permalink] [raw]
Subject: RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail

> _Why_ is that warning printed? Are your devices uncalibrated or are they
> somehow else special?

I don't know, but not only my rtl8822be wifi module will have this call trace
every time when the driver probes. This can be considered a common problem.
So I prefer to disable this call trace and use the driver warning instead.

Thanks,
Chukun

--
2.25.1