Bluetooth: Fix notifying mgmt power off before flushing connection list
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 11 Dec 2014 19:45:46 +0000 (21:45 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 11 Dec 2014 19:57:39 +0000 (20:57 +0100)
This patch moves the mgmt_powered() notification earlier in the
hci_dev_do_close() function. This way the correct "not powered" error
gets passed to any pending mgmt commands. Without the patch the pending
commands would instead get a misleading "disconnected" response when
powering down the adapter.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c

Simple merge