[PATCH bluetooth-next 2/4] mac802154: iface: flush workqueue before stop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 net/mac802154/iface.c | 1 +
 1 file changed, 1 insertion(+)

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);
 	}
-- 
2.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux