]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
authorColin Ian King <colin.i.king@gmail.com>
Wed, 6 Nov 2024 15:46:42 +0000 (15:46 +0000)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 18 Nov 2024 01:46:45 +0000 (09:46 +0800)
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>
Tested-by: Ping-Ke Shih <pkshih@realtek.com>
Reviewed-by: Su Hui <suhui@nfschina.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241106154642.1627886-1-colin.i.king@gmail.com
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c

index 1be51ea3f3c8200ba4e64b1e87824f5f6d1ce5f7..9eddbada8af12c9a6180fc64eb1e9885b0697259 100644 (file)
@@ -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];
+                               }
                        }
                }
        }