@@ -3887,8 +3887,10 @@ int hci_dev_open_sync(struct hci_dev *hdev)
hci_dev_test_flag(hdev, HCI_VENDOR_DIAG) && hdev->set_diag)
ret = hdev->set_diag(hdev, true);
- msft_do_open(hdev);
- aosp_do_open(hdev);
+ if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
+ msft_do_open(hdev);
+ aosp_do_open(hdev);
+ }
clear_bit(HCI_INIT, &hdev->flags);
@@ -4031,8 +4033,10 @@ int hci_dev_close_sync(struct hci_dev *hdev)
hci_sock_dev_event(hdev, HCI_DEV_DOWN);
- aosp_do_close(hdev);
- msft_do_close(hdev);
+ if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
+ aosp_do_close(hdev);
+ msft_do_close(hdev);
+ }
if (hdev->flush)
hdev->flush(hdev);