CHERRY-PICK: Bluetooth: Fix indicating discovery state when canceling inquiry
When inquiry is canceled through the HCI_Cancel_Inquiry command there is
no Inquiry Complete event generated. Instead, all we get is the command
complete for the HCI_Inquiry_Cancel command. This means that we must
call the hci_discovery_set_state() function from the respective command
complete handler in order to ensure that user space knows the correct
discovery state.
BUG=chrome-os-partner:26547
TEST=Enable and disable the BT device multiple times
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 3c7f175ad7898fbeceadb2787847e23a975ebd62)
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Change-Id: Ib16f44acbb654b6c7847e69a6abaa8f532ffd39b
Reviewed-on: https://chromium-review.googlesource.com/203530
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Queue: Tedd An <tedd.an@intel.com>
Tested-by: Tedd An <tedd.an@intel.com>