mac802154: iface: flush workqueue before stop
authorAlexander Aring <alex.aring@gmail.com>
Sat, 13 Jun 2015 20:15:52 +0000 (22:15 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 14 Jun 2015 23:22:19 +0000 (01:22 +0200)
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>
net/mac802154/iface.c

index d8043378e7a067f75cbc31bbbf417dc345585be3..692731d240e483cf4ca3e2936fdd53bbb2c46991 100644 (file)
@@ -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);
        }