summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaya Erez2017-03-08 12:52:14 +0100
committerKalle Valo2017-03-09 09:04:18 +0100
commit18618a9fba33f87a1cc6083a22a541972cd3f3b3 (patch)
treea852b40a9b4c1b2dced8f3da187393aac33fcab3
parentwil6210: use print_hex_dump_debug instead of print_hex_dump_bytes (diff)
downloadkernel-qcow2-linux-18618a9fba33f87a1cc6083a22a541972cd3f3b3.tar.gz
kernel-qcow2-linux-18618a9fba33f87a1cc6083a22a541972cd3f3b3.tar.xz
kernel-qcow2-linux-18618a9fba33f87a1cc6083a22a541972cd3f3b3.zip
wil6210: missing reinit_completion in HALP voting
After setting HALP ICR bit, we keep it set until HALP unvote. Masking HALP ICR should protect the driver from hitting the HALP ICR over and over again. However, in case there is another MISC ICR we will read the HALP ICR and issue a completion. This can lead to a case where HALP voting is completed immediately, as the completion is already set. Reinit the HALP completion before the actual vote will clear previous completions and protect from such cases. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/wil6210/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 21b7faca2c9b..dddde94f0356 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1158,6 +1158,7 @@ void wil_halp_vote(struct wil6210_priv *wil)
wil->halp.ref_cnt);
if (++wil->halp.ref_cnt == 1) {
+ reinit_completion(&wil->halp.comp);
wil6210_set_halp(wil);
rc = wait_for_completion_timeout(&wil->halp.comp, to_jiffies);
if (!rc) {