Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f54b6540 authored by Hamad Kadmany's avatar Hamad Kadmany Committed by Alexei Avshalom Lazar
Browse files

wil6210: add proper locking in cfg suspend



wil_p2p_stop_discovery and wil_abort_scan assume
specific locks are acquired when called.

Change-Id: I1f5d50b2a7628b557b62060d250e014ff9c74565
Signed-off-by: default avatarAlexei Avshalom Lazar <ailizaro@codeaurora.org>
parent 84a47e8c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1801,9 +1801,13 @@ static int wil_cfg80211_suspend(struct wiphy *wiphy,

	wil_dbg_pm(wil, "suspending\n");

	mutex_lock(&wil->mutex);
	wil_p2p_stop_discovery(wil);

	mutex_lock(&wil->p2p_wdev_mutex);
	wil_abort_scan(wil, true);
	mutex_unlock(&wil->p2p_wdev_mutex);
	mutex_unlock(&wil->mutex);

out:
	return rc;