• John Keeping's avatar
    Bluetooth: use wait_event API instead of open-coding it · 67d8cee4
    John Keeping authored
    I've seen timeout errors from HCI commands where it looks like
    schedule_timeout() has returned immediately; additional logging for the
    error case gives:
    
    	req_status=1 req_result=0 remaining=10000 jiffies
    
    so the device is still in state HCI_REQ_PEND and the value returned by
    schedule_timeout() is the same as the original timeout (HCI_INIT_TIMEOUT
    on a system with HZ=1000).
    
    Use wait_event_interruptible_timeout() instead of open-coding similar
    behaviour which is subject to the spurious failure described above.
    Signed-off-by: default avatarJohn Keeping <john@metanate.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    67d8cee4
hci_request.c 60 KB