1 From 5e5903a442bb889a62a0f5d89ac33e53ab08592c Mon Sep 17 00:00:00 2001
2 From: Colin Ian King <colin.i.king@gmail.com>
3 Date: Wed, 6 Nov 2024 15:46:42 +0000
4 Subject: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix
7 A previous clean-up fix removed the assignment of v2 inside a while loop
8 that turned it into an infinite loop. Fix this by restoring the assignment
9 of v2 from array[] so that v2 is updated inside the loop.
11 Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code")
12 Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
13 Tested-by: Ping-Ke Shih <pkshih@realtek.com>
14 Reviewed-by: Su Hui <suhui@nfschina.com>
15 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
16 Link: https://patch.msgid.link/20241106154642.1627886-1-colin.i.king@gmail.com
18 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++-
19 1 file changed, 3 insertions(+), 1 deletion(-)
21 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
22 +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
23 @@ -2033,8 +2033,10 @@ static bool _rtl8821ae_phy_config_bb_wit
24 if (!_rtl8821ae_check_condition(hw, v1)) {
25 i += 2; /* skip the pair of expression*/
27 - while (v2 != 0xDEAD)
28 + while (v2 != 0xDEAD) {