• Johan Hedberg's avatar
    Bluetooth: Add __hci_cmd_sync() helper function · 75e84b7c
    Johan Hedberg authored
    This patch adds a helper function for sending a single HCI command
    waiting for its completion and then returning back the parameters in the
    resulting command complete event (if there was one).
    
    The implementation is very similar to that of hci_req_sync() except that
    instead of invocing a callback for sending HCI commands the function
    constructs and sends one itself and after being woken up picks the last
    received event from hdev->recv_evt (if it matches the right criteria)
    and returns it.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    75e84b7c
hci_core.c 75.4 KB