]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Add __hci_cmd_sync() helper function
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 2 Apr 2013 10:35:04 +0000 (13:35 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 4 Apr 2013 16:16:06 +0000 (19:16 +0300)
commite4e834c35ae1f9a6d2f236f28e9c226bb1cf356d
treef446f05dddbc3fff7f9345ac524239f4e7d19baf
parent0355a00967b876d47bf3fd98d2bf163a239d7722
Bluetooth: Add __hci_cmd_sync() helper function

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: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c