From: Alexander Aring Date: Sat, 13 Jun 2015 20:15:52 +0000 (+0200) Subject: mac802154: iface: flush workqueue before stop X-Git-Tag: v4.9.8~4072^2~29^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed2e627cb17d385f02d0a28fd7e564031f7769b0;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Marcel Holtmann --- 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 @@ static int mac802154_slave_close(struct net_device *dev) clear_bit(SDATA_STATE_RUNNING, &sdata->state); if (!local->open_count) { + flush_workqueue(local->workqueue); hrtimer_cancel(&local->ifs_timer); drv_stop(local); }