Commit 674ece27 authored by Zong-Zhe Yang's avatar Zong-Zhe Yang Committed by Kalle Valo

wifi: rtw89: refine leaving LPS function

It's unnecessary to iterate leaving PS mode.
So, move it out of the iteration.
Signed-off-by: default avatarZong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220802123712.16577-1-pkshih@realtek.com
parent 6b013c3d
...@@ -127,7 +127,6 @@ static void rtw89_leave_lps_vif(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwv ...@@ -127,7 +127,6 @@ static void rtw89_leave_lps_vif(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwv
if (rtwvif->wifi_role != RTW89_WIFI_ROLE_STATION) if (rtwvif->wifi_role != RTW89_WIFI_ROLE_STATION)
return; return;
__rtw89_leave_ps_mode(rtwdev);
__rtw89_leave_lps(rtwdev, rtwvif->mac_id); __rtw89_leave_lps(rtwdev, rtwvif->mac_id);
} }
...@@ -140,6 +139,8 @@ void rtw89_leave_lps(struct rtw89_dev *rtwdev) ...@@ -140,6 +139,8 @@ void rtw89_leave_lps(struct rtw89_dev *rtwdev)
if (!test_and_clear_bit(RTW89_FLAG_LEISURE_PS, rtwdev->flags)) if (!test_and_clear_bit(RTW89_FLAG_LEISURE_PS, rtwdev->flags))
return; return;
__rtw89_leave_ps_mode(rtwdev);
rtw89_for_each_rtwvif(rtwdev, rtwvif) rtw89_for_each_rtwvif(rtwdev, rtwvif)
rtw89_leave_lps_vif(rtwdev, rtwvif); rtw89_leave_lps_vif(rtwdev, rtwvif);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment