• Andre Guedes's avatar
    Bluetooth: Fix hci_inquiry ioctl usage · 3e13fa1e
    Andre Guedes authored
    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: default avatarAndre Guedes <andre.guedes@openbossa.org>
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    3e13fa1e
hci_event.c 89.1 KB