]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix hci_inquiry ioctl usage
authorAndre Guedes <andre.guedes@openbossa.org>
Wed, 27 Mar 2013 23:04:56 +0000 (20:04 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 4 Apr 2013 08:12:33 +0000 (11:12 +0300)
commitfa265084010360488570103f18f9b9dfbe87435a
tree1d4557f4d37cb982a95aec9456cf9c57e7500fa3
parentccf7dadb69a2ac23244e139f77f58740938c2b6b
Bluetooth: Fix hci_inquiry ioctl usage

Since the HCI request framework was properly fixed, the hci_req_sync
call, in hci_inquiry, will return as soon as the HCI command completes
(not the Inquiry procedure). However, in inquiry ioctl implementation,
we want to sleep the user process until the inquiry procedure finishes.

This patch changes hci_inquiry so, in case the HCI Inquiry command
was executed successfully, it waits the HCI_INQUIRY flag to be cleared.
This way, the user process will sleep until the inquiry procedure
finishes.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c