]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wil6210: abort properly in cfg suspend
authorHamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Tue, 21 Apr 2020 12:40:14 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 06:01:10 +0000 (08:01 +0200)
[ Upstream commit 144a12a6d83f3ca34ddefce5dee4d502afd2fc5b ]

On-going operations were not aborted properly
and required locks were not taken.

Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/wil6210/cfg80211.c

index c374ed311520e53d44a1140d4bee246c3077f7b8..58784e77e215bc691b460221fabff57739f992a3 100644 (file)
@@ -1735,9 +1735,12 @@ static int wil_cfg80211_suspend(struct wiphy *wiphy,
 
        wil_dbg_pm(wil, "suspending\n");
 
-       wil_p2p_stop_discovery(wil);
-
+       mutex_lock(&wil->mutex);
+       mutex_lock(&wil->p2p_wdev_mutex);
+       wil_p2p_stop_radio_operations(wil);
        wil_abort_scan(wil, true);
+       mutex_unlock(&wil->p2p_wdev_mutex);
+       mutex_unlock(&wil->mutex);
 
 out:
        return rc;