Commit d08458b5 authored by Chih-Kang Chang's avatar Chih-Kang Chang Committed by Kalle Valo

wifi: rtw88: add flushing queue before HW scan

We need to flush queue before HW scan to avoid packets dropped by hardware.
Signed-off-by: default avatarChih-Kang Chang <gary.chang@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/20220809084107.38137-6-pkshih@realtek.com
parent 68c53914
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "wow.h" #include "wow.h"
#include "ps.h" #include "ps.h"
#include "phy.h" #include "phy.h"
#include "mac.h"
static void rtw_fw_c2h_cmd_handle_ext(struct rtw_dev *rtwdev, static void rtw_fw_c2h_cmd_handle_ext(struct rtw_dev *rtwdev,
struct sk_buff *skb) struct sk_buff *skb)
...@@ -2056,6 +2057,9 @@ void rtw_hw_scan_start(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, ...@@ -2056,6 +2057,9 @@ void rtw_hw_scan_start(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
rtwvif->scan_req = req; rtwvif->scan_req = req;
ieee80211_stop_queues(rtwdev->hw); ieee80211_stop_queues(rtwdev->hw);
rtw_leave_lps_deep(rtwdev);
rtw_hci_flush_all_queues(rtwdev, false);
rtw_mac_flush_all_queues(rtwdev, false);
if (req->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) if (req->flags & NL80211_SCAN_FLAG_RANDOM_ADDR)
get_random_mask_addr(mac_addr, req->mac_addr, get_random_mask_addr(mac_addr, req->mac_addr,
req->mac_addr_mask); req->mac_addr_mask);
......
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