aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx/main.c
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2018-02-15 12:08:28 +0100
committerKalle Valo <kvalo@codeaurora.org>2018-02-27 18:48:41 +0200
commit9bfd05e35ac3519c26ffa0bfb1ab8933c8f00c74 (patch)
treece1ff708341bf954cdbc66c4c48bb328c2cd16e1 /drivers/net/wireless/ath/wcn36xx/main.c
parentath9k: Fix ack SIFS time for quarter/half channels (diff)
downloadlinux-dev-9bfd05e35ac3519c26ffa0bfb1ab8933c8f00c74.tar.xz
linux-dev-9bfd05e35ac3519c26ffa0bfb1ab8933c8f00c74.zip
wcn36xx: Fix warning due to duplicate scan_completed notification
The wcn36xx_cancel_hw_scan method stops the hw scan and notify the scan completion via ieee80211_scan_completed. However, on scan offload cancellation, firmware sends a scan complete indication, triggering a new call to ieee80211_scan_completed. This leads to kernel warn since the scan has already been completed. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/main.c')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index ab5be6d2c691..fcc98d4f9f9e 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -666,16 +666,13 @@ static void wcn36xx_cancel_hw_scan(struct ieee80211_hw *hw,
{
struct wcn36xx *wcn = hw->priv;
- if (!wcn36xx_smd_stop_hw_scan(wcn)) {
- struct cfg80211_scan_info scan_info = { .aborted = true };
-
- ieee80211_scan_completed(wcn->hw, &scan_info);
- }
-
mutex_lock(&wcn->scan_lock);
wcn->scan_aborted = true;
mutex_unlock(&wcn->scan_lock);
+ /* ieee80211_scan_completed will be called on FW scan indication */
+ wcn36xx_smd_stop_hw_scan(wcn);
+
cancel_work_sync(&wcn->scan_work);
}