wifi: rtw89: fix HW scan abort not completed issue
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtw89: fix HW scan abort not completed issue
From: Chih-Kang Chang <[email protected]>
When scan happens before suspending, rtw89_hw_scan_complete() might happen after suspend flow. This causes the scan to be unable to properly indicate scan completion to mac80211 before suspending. To fix this issue, we modify to execute rtw89_hw_scan_complete() when rtw89_hw_scan_abort() is called, regardless of result of rtw89_hw_scan_offload().
--- drivers/net/wireless/realtek/rtw89/fw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/fw.c +4 -2
@@ -6212,7 +6212,7 @@ void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, .aborted = aborted, }; -if (!vif) +if (!vif || !rtwdev->scanning)return ; rtw89_write32_mask(rtwdev,
@@ -6245,7 +6245,9 @@ void rtw89_hw_scan_abort(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif) ret =rtw89_hw_scan_offload (rtwdev, vif, false);if (ret) -rtw89_hw_scan_complete (rtwdev, vif, true); +rtw89_warn (rtwdev,"rtw89_hw_scan_offload failed ret %d\n" , ret); + +rtw89_hw_scan_complete (rtwdev, vif, true); }static bool rtw89_is_any_vif_connected_or_connecting (struct rtw89_dev *rtwdev)
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerQuoted 9 lines · Ping-Ke Shih
From: Chih-Kang Chang <[email protected]>
When scan happens before suspending,
rtw89_hw_scan_complete()might happen after suspend flow. This causes the scan to be unable to properly indicate scan completion to mac80211 before suspending. To fix this issue, we modify to executertw89_hw_scan_complete()whenrtw89_hw_scan_abort()is called, regardless of result ofrtw89_hw_scan_offload().
Quoted 4 lines
Fixes bcbefbd032df ("wifi: rtw89: add wait/completion for abort scan")Signed-off-by Chih-Kang Chang <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
It seems have better way to fix this problem. Drop this patch for now.