Ping-Ke Shih <pkshih@xxxxxxxxxxx> wrote: > From: Po-Hao Huang <phhuang@xxxxxxxxxxx> > > There is a length limit on the commands we send to firmware, so > dividing to two commands is sometimes required when scanning. > When aborting scan, we should not send second scan command to > firmware after the first one is finished. This could cause some > unexpected errors when we cannot receive firmware events > (e.g. in suspend). > > Another case is scan happens before suspending, ieee80211_do_stop() is > called to abort scan and driver indicate scan completion by > ieee80211_scan_completed(), which queues event to scan work. But scan work > might be late to execute after ieee80211_do_stop(). To correct this, driver > indicates ieee80211_scan_completed() before returning, so that > ieee80211_do_stop() can flush scan work properly. > > Fixes: bcbefbd032df ("wifi: rtw89: add wait/completion for abort scan") > Cc: stable@xxxxxxxxxxxxxxx > Co-developed-by: Chih-Kang Chang <gary.chang@xxxxxxxxxxx> > Signed-off-by: Chih-Kang Chang <gary.chang@xxxxxxxxxxx> > Signed-off-by: Po-Hao Huang <phhuang@xxxxxxxxxxx> > Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx> 1 patch(es) applied to rtw-next branch of rtw.git, thanks. 669b692247d4 wifi: rtw89: fix HW scan not aborting properly --- https://github.com/pkshih/rtw.git