]> git.baikalelectronics.ru Git - kernel.git/commit
wil6210: drop old event after wmi_call timeout
authorAhmad Masri <amasri@codeaurora.org>
Sun, 16 Jun 2019 07:26:07 +0000 (10:26 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 27 Jun 2019 17:51:04 +0000 (20:51 +0300)
commit29e7495d244ec836fe494807167af5d2c7c08711
treeacccf744f18d1396dc547cd9ca5143f1bc1c72d4
parent72cfcc8fe85eae35fd3c72e8fc12466a9e25af3c
wil6210: drop old event after wmi_call timeout

This change fixes a rare race condition of handling WMI events after
wmi_call expires.

wmi_recv_cmd immediately handles an event when reply_buf is defined and
a wmi_call is waiting for the event.
However, in case the wmi_call has already timed-out, there will be no
waiting/running wmi_call and the event will be queued in WMI queue and
will be handled later in wmi_event_handle.
Meanwhile, a new similar wmi_call for the same command and event may
be issued. In this case, when handling the queued event we got WARN_ON
printed.

Fixing this case as a valid timeout and drop the unexpected event.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wil6210/wmi.c