public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH rtw-next] wifi: rtw88: WARN only once in rtw_phy_get_tx_power_limit()
Date: Mon, 9 Feb 2026 08:01:28 +0000	[thread overview]
Message-ID: <946684847bb0463aa794828d3e1a3e83@realtek.com> (raw)
In-Reply-To: <98129317-7e88-4654-910b-630aa992bfa3@gmail.com>

Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> 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

As the issue says "invalid arguments, band=1, bw=2, path=1, rate=83, ch=130",
I think it operates on bandwidth 80MHz and primary channel 130. 
But I don't see 20MHz primary channel, for example [1]. 

Can we stop using this channel at set_channel() ahead to avoid this error?

[1] https://en.wikipedia.org/wiki/List_of_WLAN_channels


> 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;

I feel this will be a problem if max_power_index is adopted.
The power is too high. 

>  }
> 
> --
> 2.52.0


  reply	other threads:[~2026-02-09  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-03-25 23:03   ` Bitterblue Smith
2026-03-26  1:58     ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=946684847bb0463aa794828d3e1a3e83@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox