Commit 773f9a28 authored by Daniel Mack's avatar Daniel Mack Committed by Kalle Valo

wcn36xx: drain pending indicator messages on shutdown

When the interface is shut down, wcn36xx_smd_close() potentially races
against the queue worker. Make sure to cancel the work, and then free all
the remnants in hal_ind_queue manually.

This is again just a theoretical issue, not something that was triggered in
the wild.
Signed-off-by: default avatarDaniel Mack <daniel@zonque.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 2a46c829
......@@ -2513,5 +2513,11 @@ int wcn36xx_smd_open(struct wcn36xx *wcn)
void wcn36xx_smd_close(struct wcn36xx *wcn)
{
struct wcn36xx_hal_ind_msg *msg, *tmp;
cancel_work_sync(&wcn->hal_ind_work);
destroy_workqueue(wcn->hal_ind_wq);
list_for_each_entry_safe(msg, tmp, &wcn->hal_ind_queue, list)
kfree(msg);
}
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