提交 eb6f95f9 编写于 作者: F Florian Grandel 提交者: Marcel Holtmann

Bluetooth: mgmt: multi-adv for mgmt_reenable_advertising()

During service discovery, advertising will be disabled. This patch
ensures that it is correctly being re-enabled, both for configuration
made via set advertising and add advertising, once the scanning
times out.
Signed-off-by: NFlorian Grandel <fgrandel@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 9d5fc2f2
......@@ -8610,13 +8610,24 @@ static void adv_enable_complete(struct hci_dev *hdev, u8 status, u16 opcode)
void mgmt_reenable_advertising(struct hci_dev *hdev)
{
struct hci_request req;
u8 instance;
if (!hci_dev_test_flag(hdev, HCI_ADVERTISING) &&
!hci_dev_test_flag(hdev, HCI_ADVERTISING_INSTANCE))
return;
instance = get_current_adv_instance(hdev);
hci_req_init(&req, hdev);
enable_advertising(&req);
if (instance) {
schedule_adv_instance(&req, instance, true);
} else {
update_adv_data(&req);
update_scan_rsp_data(&req);
enable_advertising(&req);
}
hci_req_run(&req, adv_enable_complete);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册