Bluetooth: Fix setting STOPPING state for discovery
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 8 Jul 2014 13:05:06 +0000 (16:05 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 8 Jul 2014 13:09:46 +0000 (15:09 +0200)
commit23a48093b53999f8539144db1d9567964a84655c
tree2e440c55e8d1f962d1371ca53141a3b5c14025de
parent34722277045f84d0ee618865d02030a44b1ed257
Bluetooth: Fix setting STOPPING state for discovery

If any of the HCI commands from the hci_stop_discovery function were
successfully sent we need to set the discovery state to STOPPING. The
Stop Discovery code was already handling this, but the code in
clean_up_hci_state was not. This patch updates the hci_stop_discovery to
return a bool to indicate whether it queued any commands and the
clean_up_hci_state() function respectively to look at the return value
and call hci_discovery_set_state() if necessary.

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