mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 23:25:13 -04:00
Bluetooth: hci_sync: Introduce __hci_reset_sync() for device drivers
Several vendor drivers have a requirement to send a synchronous raw HCI reset with HCI_INIT_TIMEOUT. Add a dedicated __hci_reset_sync() for them to use. Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
committed by
Luiz Augusto von Dentz
parent
01f9b34e4a
commit
faeaddd353
@@ -59,6 +59,7 @@ int __hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen,
|
||||
int __hci_cmd_sync_status_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
|
||||
const void *param, u8 event, u32 timeout,
|
||||
struct sock *sk);
|
||||
int __hci_reset_sync(struct hci_dev *hdev);
|
||||
int hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen,
|
||||
const void *param, u32 timeout);
|
||||
|
||||
|
||||
@@ -3766,6 +3766,14 @@ int hci_reset_sync(struct hci_dev *hdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Send a raw HCI reset for use by vendor drivers */
|
||||
int __hci_reset_sync(struct hci_dev *hdev)
|
||||
{
|
||||
return __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL,
|
||||
HCI_INIT_TIMEOUT);
|
||||
}
|
||||
EXPORT_SYMBOL(__hci_reset_sync);
|
||||
|
||||
static int hci_init0_sync(struct hci_dev *hdev)
|
||||
{
|
||||
int err;
|
||||
|
||||
Reference in New Issue
Block a user