summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210/wmi.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-12-06 17:11:01 +0200
committerMaya Erez <merez@codeaurora.org>2016-12-08 13:23:56 +0200
commite59cb70927f71e4d32492b9ae862c084759ca51a (patch)
tree6ab1bdcf1659fbe395ba3e7f0259ab68ed1c01a2 /drivers/net/wireless/ath/wil6210/wmi.c
parentef155fc78c9fd5f3166693ea7273c19f847b595d (diff)
wil6210: delay remain on channel when scan is active
Currently it was possible to call remain_on_channel(ROC) while scan was active and this caused a crash in the FW. In order to fix this problem and make the behavior consistent with other drivers, queue the ROC in case a scan is active and try it again when scan is done. As part of the fix, clean up some locking issues and return error if scan is called while ROC is active. Change-Id: Ic074ec19142c55e80eb34c26168357b4398ba1ce Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: bb6743f7c2ffc467002dfe24bea5dedc96c7da04 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git Signed-off-by: Maya Erez <merez@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wmi.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/wmi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index f8984c114e55..54db9a9084f9 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -441,6 +441,10 @@ static void wmi_evt_scan_complete(struct wil6210_priv *wil, int id,
wil->radio_wdev = wil->wdev;
wil->scan_request = NULL;
wake_up_interruptible(&wil->wq);
+ if (wil->p2p.pending_listen_wdev) {
+ wil_dbg_misc(wil, "Scheduling delayed listen\n");
+ schedule_work(&wil->p2p.delayed_listen_work);
+ }
} else {
wil_err(wil, "SCAN_COMPLETE while not scanning\n");
}