Commit 18618a9f authored by Maya Erez's avatar Maya Erez Committed by Kalle Valo

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: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 5eb443e9
...@@ -1158,6 +1158,7 @@ void wil_halp_vote(struct wil6210_priv *wil) ...@@ -1158,6 +1158,7 @@ void wil_halp_vote(struct wil6210_priv *wil)
wil->halp.ref_cnt); wil->halp.ref_cnt);
if (++wil->halp.ref_cnt == 1) { if (++wil->halp.ref_cnt == 1) {
reinit_completion(&wil->halp.comp);
wil6210_set_halp(wil); wil6210_set_halp(wil);
rc = wait_for_completion_timeout(&wil->halp.comp, to_jiffies); rc = wait_for_completion_timeout(&wil->halp.comp, to_jiffies);
if (!rc) { if (!rc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment