mac802154: iface: flush workqueue before stop
This patch flushs the workqueue which is currently used for xmit_sync
callback before calling stop driver-ops. Flush the queue will ensure all
pending tx frames are transmitted.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index d804337..692731d 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -308,6 +308,7 @@
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
if (!local->open_count) {
+ flush_workqueue(local->workqueue);
hrtimer_cancel(&local->ifs_timer);
drv_stop(local);
}