Bluetooth: Wait for HCI command completion with mgmt_set_powered
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 15 Mar 2013 22:06:53 +0000 (17:06 -0500)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 18 Mar 2013 17:02:00 +0000 (14:02 -0300)
commit229ab39caf8c1321527e408725c1350f7c9aaa84
tree2fbbef772f20272fb1fe716a9f248cd5b2def8d9
parent890ea8988f7d17453515122041adb0e1acdb6025
Bluetooth: Wait for HCI command completion with mgmt_set_powered

We should only notify user space that the adapter has been powered on
after all HCI commands related to the action have completed. This patch
fixes the issue by instating an async request complete callback for
these HCI commands and only notifies user space in the callback.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c