public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Colin Ian King <colin.i.king@gmail.com>,
	Kalle Valo <kvalo@kernel.org>, Su Hui <suhui@nfschina.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
Date: Thu, 7 Nov 2024 00:51:25 +0000	[thread overview]
Message-ID: <c39feb8063924701b99965e6b650c993@realtek.com> (raw)
In-Reply-To: <20241106154642.1627886-1-colin.i.king@gmail.com>

Colin Ian King <colin.i.king@gmail.com> wrote:
> A previous clean-up fix removed the assignment of v2 inside a while loop
> that turned it into an infinite loop. Fix this by restoring the assignment
> of v2 from array[] so that v2 is updated inside the loop.
> 
> Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

I tested RTL8812AE/8821AE. Luckily, parsing current PHY register parameters
never falls into the check condition. 

Tested-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> index 1be51ea3f3c8..0d4d787e8be5 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> @@ -2033,8 +2033,10 @@ static bool _rtl8821ae_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
>                         if (!_rtl8821ae_check_condition(hw, v1)) {
>                                 i += 2; /* skip the pair of expression*/
>                                 v2 = array[i+1];
> -                               while (v2 != 0xDEAD)
> +                               while (v2 != 0xDEAD) {
>                                         i += 3;
> +                                       v2 = array[i + 1];
> +                               }
>                         }
>                 }
>         }
> --
> 2.39.5


  parent reply	other threads:[~2024-11-07  0:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 15:46 [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop Colin Ian King
2024-11-06 15:50 ` kernel test robot
2024-11-07  0:51 ` Ping-Ke Shih [this message]
2024-11-07  1:14   ` Su Hui
2024-11-18  1:48 ` 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=c39feb8063924701b99965e6b650c993@realtek.com \
    --to=pkshih@realtek.com \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=suhui@nfschina.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