mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Wentao Liang <vulab@iscas.ac.cn>, "kvalo@kernel.org" <kvalo@kernel.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] rtlwifi: rtl892cu: Set limit for pwdb_all
Date: Wed, 2 Apr 2025 09:02:31 +0000	[thread overview]
Message-ID: <0af1b6ed8d5c400fb41f20169d0d173a@realtek.com> (raw)
In-Reply-To: <20250402071040.3155-1-vulab@iscas.ac.cn>

Wentao Liang <vulab@iscas.ac.cn> wrote:
> 
> In _rtl92c_query_rxphystatus(), the return rtl_query_rxpwrpercentage()
> need to be checked. A proper implementation can be found in
> _rtl8723be_query_rxphystatus(). Add a value check and set the limit of
> pwdb_add as 100.

Have you tested on real hardware? Or just guess this is a potential problem?
If that is a real problem, please point out what it happens in commit message.

By the way, subject should be "wifi: rtlwifi: ..."

> 
> Fixes: 666e8457fae4 ("rtlwifi: rtl8192cu: Add routine mac")
> Cc: stable@vger.kernel.org # v2.6+
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> index a76f2dc8a977..e2145f284ec0 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
> @@ -641,6 +641,9 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
>                         }
>                 }
>                 pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all);
> +               if (pwdb_all > 100)
> +                       pwdb_all = 100;
> +
>                 pstats->rx_pwdb_all = pwdb_all;
>                 pstats->recvsignalpower = rx_pwr_all;
>                 if (packet_match_bssid) {
> --
> 2.42.0.windows.2


      reply	other threads:[~2025-04-02  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  7:10 Wentao Liang
2025-04-02  9:02 ` Ping-Ke Shih [this message]

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=0af1b6ed8d5c400fb41f20169d0d173a@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®