提交 5fc16cc4 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Add stubs for synchronous HCI request functionality

Prepare hci_request.c to have code for doing synchronous HCI requests,
such as LE scanning or advertising changes. The necessary work
callbacks will be set up in hci_request_setup() and cleaned up in
hci_request_cancel_all(). The former is used when an HCI device get
registered, and the latter each time it is powered off (or
unregistered).
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 b504430c
......@@ -1609,6 +1609,8 @@ int hci_dev_do_close(struct hci_dev *hdev)
hci_req_sync_unlock(hdev);
hci_request_cancel_all(hdev);
hci_dev_put(hdev);
return 0;
}
......@@ -3161,6 +3163,8 @@ struct hci_dev *hci_alloc_dev(void)
INIT_DELAYED_WORK(&hdev->cmd_timer, hci_cmd_timeout);
hci_request_setup(hdev);
hci_init_sysfs(hdev);
discovery_init(hdev);
......
......@@ -845,3 +845,11 @@ int hci_abort_conn(struct hci_conn *conn, u8 reason)
return 0;
}
void hci_request_setup(struct hci_dev *hdev)
{
}
void hci_request_cancel_all(struct hci_dev *hdev)
{
}
......@@ -70,3 +70,6 @@ void __hci_update_background_scan(struct hci_request *req);
int hci_abort_conn(struct hci_conn *conn, u8 reason);
void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn,
u8 reason);
void hci_request_setup(struct hci_dev *hdev);
void hci_request_cancel_all(struct hci_dev *hdev);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册