public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rtw-next] wifi: rtw88: WARN only once in rtw_phy_get_tx_power_limit()
@ 2026-02-06 18:00 Bitterblue Smith
  2026-02-09  8:01 ` Ping-Ke Shih
  0 siblings, 1 reply; 4+ messages in thread
From: Bitterblue Smith @ 2026-02-06 18:00 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org; +Cc: Ping-Ke Shih

This function WARNs when the wifi band, channel number, channel width,
rate, or RF path are invalid. Two or three people have reported that it
floods the kernel log with warnings because they try to switch to
invalid channel numbers, like 130.

One warning is probably enough, so turn WARN into WARN_ONCE.

Closes: https://github.com/lwfinger/rtw88/issues/428
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
 drivers/net/wireless/realtek/rtw88/phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c
index e2ac5c6fd500..2a3929561664 100644
--- a/drivers/net/wireless/realtek/rtw88/phy.c
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
@@ -2210,8 +2210,8 @@ static s8 rtw_phy_get_tx_power_limit(struct rtw_dev *rtwdev, u8 band,
 	return power_limit;
 
 err:
-	WARN(1, "invalid arguments, band=%d, bw=%d, path=%d, rate=%d, ch=%d\n",
-	     band, bw, rf_path, rate, channel);
+	WARN_ONCE(1, "invalid arguments, band=%d, bw=%d, path=%d, rate=%d, ch=%d\n",
+		  band, bw, rf_path, rate, channel);
 	return (s8)rtwdev->chip->max_power_index;
 }
 
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-26  1:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 18:00 [PATCH rtw-next] wifi: rtw88: WARN only once in rtw_phy_get_tx_power_limit() Bitterblue Smith
2026-02-09  8:01 ` Ping-Ke Shih
2026-03-25 23:03   ` Bitterblue Smith
2026-03-26  1:58     ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox