]> git.baikalelectronics.ru Git - kernel.git/commit
wcn36xx: dequeue all pending indicator messages
authorDaniel Mack <daniel@zonque.org>
Tue, 27 Mar 2018 08:26:58 +0000 (11:26 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 29 Mar 2018 08:58:44 +0000 (11:58 +0300)
commit79bf686f75844972f075fc9ea4b0cb1fd53fc23c
treed23a40fd6b8e27dd49e51a5b87c809589fa923c8
parent425e96dd9c18a734933ca4262b1387992cf08c64
wcn36xx: dequeue all pending indicator messages

In case wcn36xx_smd_rsp_process() is called more than once before
hal_ind_work was dispatched, the messages will end up in hal_ind_queue,
but wcn36xx_ind_smd_work() will only look at the first message in that
list.

Fix this by dequeing the messages from the list in a loop, and only stop
when it's empty.

This issue was found during a review of the driver. In my tests, that
race never actually occured.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wcn36xx/smd.c