wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
PATCH 1/1 wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
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.
--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +3 -1
@@ -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 ]; + } } } }
Signature · 1 line
2.39.5
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: [email protected]" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 6 lines · Colin Ian King
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 <[email protected]>
I tested RTL8812AE/8821AE. Luckily, parsing current PHY register parameters never falls into the check condition.
Quoted 23 lines
--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +3
-2@@ -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
Su Hui
Reviewed-byQuoted 7 lines · Ping-Ke Shih
Quoted 6 lines · Colin Ian King
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 <[email protected]>
Thanks for your correction. I'm sorry for this stupid mistake.
Quoted 27 lines
I tested RTL8812AE/8821AE. Luckily, parsing current PHY register parameters never falls into the check condition.
Tested-by Ping-Ke Shih <[email protected]>Quoted 23 lines
--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +3
-2@@ -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
Ping-Ke Shih
maintainerQuoted 8 lines · Colin Ian King
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 <[email protected]>Tested-by Ping-Ke Shih <[email protected]>Reviewed-by Su Hui <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
5e5903a442bb wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop