* [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
@ 2023-10-12 14:01 Chukun Pan
2023-10-13 1:11 ` Ping-Ke Shih
0 siblings, 1 reply; 11+ messages in thread
From: Chukun Pan @ 2023-10-12 14:01 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: Kalle Valo, linux-wireless, linux-kernel, Chukun Pan
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 <amadeus@jmu.edu.cn>
---
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-12 14:01 [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail Chukun Pan
@ 2023-10-13 1:11 ` Ping-Ke Shih
2023-10-13 2:38 ` Chukun Pan
0 siblings, 1 reply; 11+ messages in thread
From: Ping-Ke Shih @ 2023-10-13 1:11 UTC (permalink / raw)
To: Chukun Pan
Cc: Kalle Valo, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Chukun Pan <amadeus@jmu.edu.cn>
> Sent: Thursday, October 12, 2023 10:01 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; Chukun
> Pan <amadeus@jmu.edu.cn>
> 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.
Why do you think this trace is useless? As I see, there is more than one callers.
Did you meet a real case it throws this trace? If yes, how about the frequency?
Ping-Ke
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-13 1:11 ` Ping-Ke Shih
@ 2023-10-13 2:38 ` Chukun Pan
2023-10-13 4:23 ` Kalle Valo
0 siblings, 1 reply; 11+ messages in thread
From: Chukun Pan @ 2023-10-13 2:38 UTC (permalink / raw)
To: pkshih; +Cc: kvalo, linux-kernel, linux-wireless, Chukun Pan
Hi, Ping-Ke
> Why do you think this trace is useless? As I see, there is more than one callers.
> Did you meet a real case it throws this trace? If yes, how about the frequency?
[ 217.651858] ------------[ cut here ]------------
[ 217.654813] write RF mode table fail
[ 217.657434] WARNING: CPU: 2 PID: 3705 at 0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
[ 217.662078] Modules linked in: rtw88_8822ce rtw88_8822c rtw88_8822be rtw88_8822b rtw88_8723de ...
[ 217.704412] RIP: 0010:0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
...
[ 217.737232] Call Trace:
[ 217.738683] 0xffffffffa03df943 [rtw88_8822b@00000000bf0fde9e+0x35000]
[ 217.740865] 0xffffffffa0385ab9 [rtw88_core@00000000a8d26f0d+0x1a000]
[ 217.742993] 0xffffffffa0279111 [mac80211@000000003cb4b3bd+0x7b000]
[ 217.745028] 0xffffffffa0239092 [cfg80211@00000000a951c4b5+0x46000]
[ 217.751368] ? 0xffffffffa0238de0 [cfg80211@00000000a951c4b5+0x46000]
[ 217.773278] RIP: 0033:0x7ff0cdf8836c
...
[ 217.789457] ---[ end trace 177712424e9eab4a ]---
As you can see this trace above, I don't think it's useful. This
trace throws up a lot of register values but doesn't point out why.
As long as I plug in the rtl8812bu or rtl8822be wifi modules, this
trace will be thrown every time when the rtw88 driver is loaded.
Thanks,
Chukun
--
2.25.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-13 2:38 ` Chukun Pan
@ 2023-10-13 4:23 ` Kalle Valo
2023-10-22 9:09 ` Chukun Pan
0 siblings, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2023-10-13 4:23 UTC (permalink / raw)
To: Chukun Pan; +Cc: pkshih, linux-kernel, linux-wireless
Chukun Pan <amadeus@jmu.edu.cn> writes:
> Hi, Ping-Ke
>
>> Why do you think this trace is useless? As I see, there is more than one callers.
>> Did you meet a real case it throws this trace? If yes, how about the frequency?
>
> [ 217.651858] ------------[ cut here ]------------
> [ 217.654813] write RF mode table fail
> [ 217.657434] WARNING: CPU: 2 PID: 3705 at 0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
> [ 217.662078] Modules linked in: rtw88_8822ce rtw88_8822c rtw88_8822be rtw88_8822b rtw88_8723de ...
> [ 217.704412] RIP: 0010:0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
> ...
> [ 217.737232] Call Trace:
> [ 217.738683] 0xffffffffa03df943 [rtw88_8822b@00000000bf0fde9e+0x35000]
> [ 217.740865] 0xffffffffa0385ab9 [rtw88_core@00000000a8d26f0d+0x1a000]
> [ 217.742993] 0xffffffffa0279111 [mac80211@000000003cb4b3bd+0x7b000]
> [ 217.745028] 0xffffffffa0239092 [cfg80211@00000000a951c4b5+0x46000]
> [ 217.751368] ? 0xffffffffa0238de0 [cfg80211@00000000a951c4b5+0x46000]
> [ 217.773278] RIP: 0033:0x7ff0cdf8836c
> ...
> [ 217.789457] ---[ end trace 177712424e9eab4a ]---
>
> As you can see this trace above, I don't think it's useful. This
> trace throws up a lot of register values but doesn't point out why.
> As long as I plug in the rtl8812bu or rtl8822be wifi modules, this
> trace will be thrown every time when the rtw88 driver is loaded.
_Why_ is that warning printed? Are your devices uncalibrated or are they
somehow else special?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-13 4:23 ` Kalle Valo
@ 2023-10-22 9:09 ` Chukun Pan
2023-10-23 2:22 ` Ping-Ke Shih
2023-10-23 8:21 ` Kalle Valo
0 siblings, 2 replies; 11+ messages in thread
From: Chukun Pan @ 2023-10-22 9:09 UTC (permalink / raw)
To: kvalo; +Cc: pkshih, linux-kernel, linux-wireless, Chukun Pan
> _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
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-22 9:09 ` Chukun Pan
@ 2023-10-23 2:22 ` Ping-Ke Shih
2023-10-25 4:01 ` Chukun Pan
2023-10-23 8:21 ` Kalle Valo
1 sibling, 1 reply; 11+ messages in thread
From: Ping-Ke Shih @ 2023-10-23 2:22 UTC (permalink / raw)
To: Chukun Pan, kvalo@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
> -----Original Message-----
> From: Chukun Pan <amadeus@jmu.edu.cn>
> Sent: Sunday, October 22, 2023 5:09 PM
> To: kvalo@kernel.org
> Cc: Ping-Ke Shih <pkshih@realtek.com>; linux-kernel@vger.kernel.org; linux-wireless@vger.kernel.org;
> Chukun Pan <amadeus@jmu.edu.cn>
> 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.
>
Except to call trace, rtl8822be works well in your side? If so, you just
worry the verbose trace, right?
By the way, I tested two hardware version of rtl8822be, and they both are fine.
Ping-Ke
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-22 9:09 ` Chukun Pan
2023-10-23 2:22 ` Ping-Ke Shih
@ 2023-10-23 8:21 ` Kalle Valo
2025-11-24 14:10 ` Bitterblue Smith
1 sibling, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2023-10-23 8:21 UTC (permalink / raw)
To: Chukun Pan; +Cc: pkshih, linux-kernel, linux-wireless
Chukun Pan <amadeus@jmu.edu.cn> writes:
>> _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.
Why do you say this is a common problem? AFAIK you are the only one
reporting this issue, right? It would help to understand _why_ you are
seeing this, ie. what's the root cause? Just randomly removing warnings
without understanding the root cause is frowned upon.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-23 2:22 ` Ping-Ke Shih
@ 2023-10-25 4:01 ` Chukun Pan
0 siblings, 0 replies; 11+ messages in thread
From: Chukun Pan @ 2023-10-25 4:01 UTC (permalink / raw)
To: pkshih; +Cc: kvalo, linux-kernel, linux-wireless, Chukun Pan
> Except to call trace, rtl8822be works well in your side? If so, you just
> worry the verbose trace, right?
Yes, it's a bit noisy.
> By the way, I tested two hardware version of rtl8822be, and they both are fine.
Sorry wasted your time, but can you test the rtl8812bu wifi module?
Based on the issues search, I'm not the only one who has this problem.
https://github.com/lwfinger/rtw88/issues/111#issuecomment-1385923235
https://github.com/lwfinger/rtw88/issues/151#issuecomment-1753011363
Thanks,
Chukun
--
2.25.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2023-10-23 8:21 ` Kalle Valo
@ 2025-11-24 14:10 ` Bitterblue Smith
2025-11-25 0:30 ` Ping-Ke Shih
0 siblings, 1 reply; 11+ messages in thread
From: Bitterblue Smith @ 2025-11-24 14:10 UTC (permalink / raw)
To: Kalle Valo, Chukun Pan; +Cc: pkshih, linux-kernel, linux-wireless
On 23/10/2023 11:21, Kalle Valo wrote:
> Chukun Pan <amadeus@jmu.edu.cn> writes:
>
>>> _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.
>
> Why do you say this is a common problem? AFAIK you are the only one
> reporting this issue, right? It would help to understand _why_ you are
> seeing this, ie. what's the root cause? Just randomly removing warnings
> without understanding the root cause is frowned upon.
>
Finally I got some useful reports about this. Someone added a printk
that shows the value of RF register 0x33 is 0xaeaea. This is why the
WARNING is triggered. The value 0xaeaea hints that the chip is powered
off.
Then someone else provided a useful backtrace:
[ 406.705972] ------------[ cut here ]------------
[ 406.710517] WARNING: CPU: 0 PID: 10287 at backports-6.12.44/drivers/net/wireless/realtek/rtw88/rtw8822b.c:824 rtw8822b_set_antenna+0x3c/0x74 [rtw88_8822b]
[ 406.724296] write RF mode table fail
[ 406.727768] Modules linked in: rtw88_8822cu(O) rtw88_8822c(O) rtw88_8822bu(O) rtw88_8822b(O) pppoe ppp_async wireguard rtw88_usb(O) rtw88_core(O) qcserial pppox ppp_generic option nft_fib_inet nf_flow_table_inet mac80211(O) libchacha20poly1305 ipt_REJECT cfg80211(O) xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_policy xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY xfrm_interface usb_wwan slhc rtc_ds1307 rndis_host rfcomm qmi_wwan poly1305_arm nft_xfrm nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota nft_numgen nft_nat nft_meta_bridge nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_compat nft_chain_nat nf_tables nf_reject_ipv4 nf_nat nf_log_syslog nf_flow_table nf_conntrack_bridge nf_conncount mdio_netlink(O) lm75 libcurve25519_generic libcrc32c iptable_raw
[ 406.728658] iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables hwmon hidp hci_uart crc_ccitt compat(O) chacha_neon cdc_ether btusb btrtl btmtk btintel bnep bluetooth act_connmark nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact configs hid ledtrig_pattern ledtrig_oneshot cryptodev(O) xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ipmac ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 swconfig qmi_wwan_q(O) usbnet cdc_wdm ip6_gre ip_gre gre ifb dummy ip6_vti ip_vti ip6_udp_tunnel udp_tunnel ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel ipcomp esp4 ah4 ipip ip6_tunnel tunnel6 tunnel4 ip_tunnel vrf
[ 406.818527] tun xfrm_user xfrm_ipcomp af_key xfrm_algo ecdh_generic ecc crypto_user algif_skcipher algif_rng algif_hash algif_aead af_alg sha512_arm sha1_generic sha1_arm md5 kpp echainiv ecb des_generic libdes cmac cbc authencesn authenc gpio_keys_polled ledtrig_transient fsl_mph_dr_of ehci_platform ehci_fsl microchip mii
[ 406.937051] CPU: 0 PID: 10287 Comm: iw Tainted: G W O 6.6.104 #0
[ 406.944163] Hardware name: Atmel SAMA5
[ 406.947867] unwind_backtrace from show_stack+0x10/0x14
[ 406.953043] show_stack from dump_stack_lvl+0x24/0x2c
[ 406.958033] dump_stack_lvl from __warn+0x98/0xc0
[ 406.962668] __warn from warn_slowpath_fmt+0x68/0x78
[ 406.967561] warn_slowpath_fmt from rtw8822b_set_antenna+0x3c/0x74 [rtw88_8822b]
[ 406.974877] rtw8822b_set_antenna [rtw88_8822b] from rtw_ops_set_antenna+0x4c/0x6c [rtw88_core]
[ 406.983566] rtw_ops_set_antenna [rtw88_core] from ieee80211_set_antenna+0x34/0x5c [mac80211]
[ 406.992524] ieee80211_set_antenna [mac80211] from nl80211_set_wiphy+0x37c/0x634 [cfg80211]
[ 407.001418] nl80211_set_wiphy [cfg80211] from genl_rcv_msg+0x24c/0x390
[ 407.008146] genl_rcv_msg from netlink_rcv_skb+0xb8/0x11c
[ 407.013465] netlink_rcv_skb from genl_rcv+0x28/0x34
[ 407.018358] genl_rcv from netlink_unicast+0x220/0x314
[ 407.023423] netlink_unicast from netlink_sendmsg+0x1cc/0x434
[ 407.029089] netlink_sendmsg from ____sys_sendmsg+0x1f0/0x284
[ 407.034758] ____sys_sendmsg from ___sys_sendmsg+0x6c/0xa4
[ 407.040165] ___sys_sendmsg from sys_sendmsg+0x44/0x74
[ 407.045230] sys_sendmsg from ret_fast_syscall+0x0/0x54
So I tried to run "iw phy5 set antenna all" on my computer. When the
interface is UP this command fails with error -95. No WARNING.
When the interface is DOWN this command succeeds but the WARNING
appears because the chip is powered off.
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2025-11-24 14:10 ` Bitterblue Smith
@ 2025-11-25 0:30 ` Ping-Ke Shih
2025-11-27 14:39 ` Bitterblue Smith
0 siblings, 1 reply; 11+ messages in thread
From: Ping-Ke Shih @ 2025-11-25 0:30 UTC (permalink / raw)
To: Bitterblue Smith, Kalle Valo, Chukun Pan
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> On 23/10/2023 11:21, Kalle Valo wrote:
> > Chukun Pan <amadeus@jmu.edu.cn> writes:
> >
> >>> _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.
> >
> > Why do you say this is a common problem? AFAIK you are the only one
> > reporting this issue, right? It would help to understand _why_ you are
> > seeing this, ie. what's the root cause? Just randomly removing warnings
> > without understanding the root cause is frowned upon.
> >
>
> Finally I got some useful reports about this. Someone added a printk
> that shows the value of RF register 0x33 is 0xaeaea. This is why the
> WARNING is triggered. The value 0xaeaea hints that the chip is powered
> off.
>
> Then someone else provided a useful backtrace:
>
> [ 406.705972] ------------[ cut here ]------------
> [ 406.710517] WARNING: CPU: 0 PID: 10287 at
> backports-6.12.44/drivers/net/wireless/realtek/rtw88/rtw8822b.c:824 rtw8822b_set_antenna+0x3c/0x74
> [rtw88_8822b]
> [ 406.724296] write RF mode table fail
> [ 406.727768] Modules linked in: rtw88_8822cu(O) rtw88_8822c(O) rtw88_8822bu(O) rtw88_8822b(O) pppoe
> ppp_async wireguard rtw88_usb(O) rtw88_core(O) qcserial pppox ppp_generic option nft_fib_inet
> nf_flow_table_inet mac80211(O) libchacha20poly1305 ipt_REJECT cfg80211(O) xt_time xt_tcpudp xt_tcpmss
> xt_statistic xt_state xt_recent xt_policy xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper
> xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_LOG xt_HL
> xt_DSCP xt_CT xt_CLASSIFY xfrm_interface usb_wwan slhc rtc_ds1307 rndis_host rfcomm qmi_wwan poly1305_arm
> nft_xfrm nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota
> nft_numgen nft_nat nft_meta_bridge nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6
> nft_fib_ipv4 nft_fib nft_ct nft_compat nft_chain_nat nf_tables nf_reject_ipv4 nf_nat nf_log_syslog
> nf_flow_table nf_conntrack_bridge nf_conncount mdio_netlink(O) lm75 libcurve25519_generic libcrc32c
> iptable_raw
> [ 406.728658] iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables hwmon hidp hci_uart crc_ccitt compat(O)
> chacha_neon cdc_ether btusb btrtl btmtk btintel bnep bluetooth act_connmark nf_conntrack nf_defrag_ipv6
> nf_defrag_ipv4 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow
> cls_basic act_skbedit act_mirred act_gact configs hid ledtrig_pattern ledtrig_oneshot cryptodev(O) xt_set
> ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface
> ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport
> ip_set_hash_ipmark ip_set_hash_ipmac ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac
> ip_set_bitmap_ip ip_set nfnetlink ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables
> nf_reject_ipv6 swconfig qmi_wwan_q(O) usbnet cdc_wdm ip6_gre ip_gre gre ifb dummy ip6_vti ip_vti
> ip6_udp_tunnel udp_tunnel ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel ipcomp esp4 ah4 ipip ip6_tunnel tunnel6
> tunnel4 ip_tunnel vrf
> [ 406.818527] tun xfrm_user xfrm_ipcomp af_key xfrm_algo ecdh_generic ecc crypto_user algif_skcipher
> algif_rng algif_hash algif_aead af_alg sha512_arm sha1_generic sha1_arm md5 kpp echainiv ecb des_generic
> libdes cmac cbc authencesn authenc gpio_keys_polled ledtrig_transient fsl_mph_dr_of ehci_platform ehci_fsl
> microchip mii
> [ 406.937051] CPU: 0 PID: 10287 Comm: iw Tainted: G W O 6.6.104 #0
> [ 406.944163] Hardware name: Atmel SAMA5
> [ 406.947867] unwind_backtrace from show_stack+0x10/0x14
> [ 406.953043] show_stack from dump_stack_lvl+0x24/0x2c
> [ 406.958033] dump_stack_lvl from __warn+0x98/0xc0
> [ 406.962668] __warn from warn_slowpath_fmt+0x68/0x78
> [ 406.967561] warn_slowpath_fmt from rtw8822b_set_antenna+0x3c/0x74 [rtw88_8822b]
> [ 406.974877] rtw8822b_set_antenna [rtw88_8822b] from rtw_ops_set_antenna+0x4c/0x6c [rtw88_core]
> [ 406.983566] rtw_ops_set_antenna [rtw88_core] from ieee80211_set_antenna+0x34/0x5c [mac80211]
> [ 406.992524] ieee80211_set_antenna [mac80211] from nl80211_set_wiphy+0x37c/0x634 [cfg80211]
> [ 407.001418] nl80211_set_wiphy [cfg80211] from genl_rcv_msg+0x24c/0x390
> [ 407.008146] genl_rcv_msg from netlink_rcv_skb+0xb8/0x11c
> [ 407.013465] netlink_rcv_skb from genl_rcv+0x28/0x34
> [ 407.018358] genl_rcv from netlink_unicast+0x220/0x314
> [ 407.023423] netlink_unicast from netlink_sendmsg+0x1cc/0x434
> [ 407.029089] netlink_sendmsg from ____sys_sendmsg+0x1f0/0x284
> [ 407.034758] ____sys_sendmsg from ___sys_sendmsg+0x6c/0xa4
> [ 407.040165] ___sys_sendmsg from sys_sendmsg+0x44/0x74
> [ 407.045230] sys_sendmsg from ret_fast_syscall+0x0/0x54
>
> So I tried to run "iw phy5 set antenna all" on my computer. When the
> interface is UP this command fails with error -95. No WARNING.
>
> When the interface is DOWN this command succeeds but the WARNING
> appears because the chip is powered off.
So I think rtw8822b_config_trx_mode() should not be called by
rtw8822b_set_antenna() as chip is powered off.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
2025-11-25 0:30 ` Ping-Ke Shih
@ 2025-11-27 14:39 ` Bitterblue Smith
0 siblings, 0 replies; 11+ messages in thread
From: Bitterblue Smith @ 2025-11-27 14:39 UTC (permalink / raw)
To: Ping-Ke Shih, Kalle Valo, Chukun Pan
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
On 25/11/2025 02:30, Ping-Ke Shih wrote:
> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>> On 23/10/2023 11:21, Kalle Valo wrote:
>>> Chukun Pan <amadeus@jmu.edu.cn> writes:
>>>
>>>>> _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.
>>>
>>> Why do you say this is a common problem? AFAIK you are the only one
>>> reporting this issue, right? It would help to understand _why_ you are
>>> seeing this, ie. what's the root cause? Just randomly removing warnings
>>> without understanding the root cause is frowned upon.
>>>
>>
>> Finally I got some useful reports about this. Someone added a printk
>> that shows the value of RF register 0x33 is 0xaeaea. This is why the
>> WARNING is triggered. The value 0xaeaea hints that the chip is powered
>> off.
>>
>> Then someone else provided a useful backtrace:
>>
>> [ 406.705972] ------------[ cut here ]------------
>> [ 406.710517] WARNING: CPU: 0 PID: 10287 at
>> backports-6.12.44/drivers/net/wireless/realtek/rtw88/rtw8822b.c:824 rtw8822b_set_antenna+0x3c/0x74
>> [rtw88_8822b]
>> [ 406.724296] write RF mode table fail
>> [ 406.727768] Modules linked in: rtw88_8822cu(O) rtw88_8822c(O) rtw88_8822bu(O) rtw88_8822b(O) pppoe
>> ppp_async wireguard rtw88_usb(O) rtw88_core(O) qcserial pppox ppp_generic option nft_fib_inet
>> nf_flow_table_inet mac80211(O) libchacha20poly1305 ipt_REJECT cfg80211(O) xt_time xt_tcpudp xt_tcpmss
>> xt_statistic xt_state xt_recent xt_policy xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper
>> xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_LOG xt_HL
>> xt_DSCP xt_CT xt_CLASSIFY xfrm_interface usb_wwan slhc rtc_ds1307 rndis_host rfcomm qmi_wwan poly1305_arm
>> nft_xfrm nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota
>> nft_numgen nft_nat nft_meta_bridge nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6
>> nft_fib_ipv4 nft_fib nft_ct nft_compat nft_chain_nat nf_tables nf_reject_ipv4 nf_nat nf_log_syslog
>> nf_flow_table nf_conntrack_bridge nf_conncount mdio_netlink(O) lm75 libcurve25519_generic libcrc32c
>> iptable_raw
>> [ 406.728658] iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables hwmon hidp hci_uart crc_ccitt compat(O)
>> chacha_neon cdc_ether btusb btrtl btmtk btintel bnep bluetooth act_connmark nf_conntrack nf_defrag_ipv6
>> nf_defrag_ipv4 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow
>> cls_basic act_skbedit act_mirred act_gact configs hid ledtrig_pattern ledtrig_oneshot cryptodev(O) xt_set
>> ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface
>> ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport
>> ip_set_hash_ipmark ip_set_hash_ipmac ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac
>> ip_set_bitmap_ip ip_set nfnetlink ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables
>> nf_reject_ipv6 swconfig qmi_wwan_q(O) usbnet cdc_wdm ip6_gre ip_gre gre ifb dummy ip6_vti ip_vti
>> ip6_udp_tunnel udp_tunnel ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel ipcomp esp4 ah4 ipip ip6_tunnel tunnel6
>> tunnel4 ip_tunnel vrf
>> [ 406.818527] tun xfrm_user xfrm_ipcomp af_key xfrm_algo ecdh_generic ecc crypto_user algif_skcipher
>> algif_rng algif_hash algif_aead af_alg sha512_arm sha1_generic sha1_arm md5 kpp echainiv ecb des_generic
>> libdes cmac cbc authencesn authenc gpio_keys_polled ledtrig_transient fsl_mph_dr_of ehci_platform ehci_fsl
>> microchip mii
>> [ 406.937051] CPU: 0 PID: 10287 Comm: iw Tainted: G W O 6.6.104 #0
>> [ 406.944163] Hardware name: Atmel SAMA5
>> [ 406.947867] unwind_backtrace from show_stack+0x10/0x14
>> [ 406.953043] show_stack from dump_stack_lvl+0x24/0x2c
>> [ 406.958033] dump_stack_lvl from __warn+0x98/0xc0
>> [ 406.962668] __warn from warn_slowpath_fmt+0x68/0x78
>> [ 406.967561] warn_slowpath_fmt from rtw8822b_set_antenna+0x3c/0x74 [rtw88_8822b]
>> [ 406.974877] rtw8822b_set_antenna [rtw88_8822b] from rtw_ops_set_antenna+0x4c/0x6c [rtw88_core]
>> [ 406.983566] rtw_ops_set_antenna [rtw88_core] from ieee80211_set_antenna+0x34/0x5c [mac80211]
>> [ 406.992524] ieee80211_set_antenna [mac80211] from nl80211_set_wiphy+0x37c/0x634 [cfg80211]
>> [ 407.001418] nl80211_set_wiphy [cfg80211] from genl_rcv_msg+0x24c/0x390
>> [ 407.008146] genl_rcv_msg from netlink_rcv_skb+0xb8/0x11c
>> [ 407.013465] netlink_rcv_skb from genl_rcv+0x28/0x34
>> [ 407.018358] genl_rcv from netlink_unicast+0x220/0x314
>> [ 407.023423] netlink_unicast from netlink_sendmsg+0x1cc/0x434
>> [ 407.029089] netlink_sendmsg from ____sys_sendmsg+0x1f0/0x284
>> [ 407.034758] ____sys_sendmsg from ___sys_sendmsg+0x6c/0xa4
>> [ 407.040165] ___sys_sendmsg from sys_sendmsg+0x44/0x74
>> [ 407.045230] sys_sendmsg from ret_fast_syscall+0x0/0x54
>>
>> So I tried to run "iw phy5 set antenna all" on my computer. When the
>> interface is UP this command fails with error -95. No WARNING.
>>
>> When the interface is DOWN this command succeeds but the WARNING
>> appears because the chip is powered off.
>
> So I think rtw8822b_config_trx_mode() should not be called by
> rtw8822b_set_antenna() as chip is powered off.
>
Indeed. I will send a patch.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-11-27 14:39 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12 14:01 [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail Chukun Pan
2023-10-13 1:11 ` Ping-Ke Shih
2023-10-13 2:38 ` Chukun Pan
2023-10-13 4:23 ` Kalle Valo
2023-10-22 9:09 ` Chukun Pan
2023-10-23 2:22 ` Ping-Ke Shih
2023-10-25 4:01 ` Chukun Pan
2023-10-23 8:21 ` Kalle Valo
2025-11-24 14:10 ` Bitterblue Smith
2025-11-25 0:30 ` Ping-Ke Shih
2025-11-27 14:39 ` Bitterblue Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).