提交 c20c02d5 编写于 作者: M Marcel Holtmann

Bluetooth: Start background scanning only when controller is ready

When the controller is not active or in init/setup phase, do not
try to start or stop background scanning.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 7c264b10
...@@ -5317,7 +5317,10 @@ void hci_update_background_scan(struct hci_dev *hdev) ...@@ -5317,7 +5317,10 @@ void hci_update_background_scan(struct hci_dev *hdev)
struct hci_conn *conn; struct hci_conn *conn;
int err; int err;
if (test_bit(HCI_UNREGISTER, &hdev->dev_flags)) if (!test_bit(HCI_UP, &hdev->flags) ||
test_bit(HCI_INIT, &hdev->flags) ||
test_bit(HCI_SETUP, &hdev->dev_flags) ||
test_bit(HCI_UNREGISTER, &hdev->dev_flags))
return; return;
hci_req_init(&req, hdev); hci_req_init(&req, hdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册