Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[deliverable/linux.git] / net / bluetooth / hci_core.c
index 7140f83328a2a3b7ff00a5aa4fcdf72b87fcd5d9..596660d37c5e56d6a0178b16b288a2d3c868f965 100644 (file)
@@ -861,6 +861,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
        /* Clear flags */
        hdev->flags = 0;
 
+       /* Controller radio is available but is currently powered down */
+       hdev->amp_status = 0;
+
        memset(hdev->eir, 0, sizeof(hdev->eir));
        memset(hdev->dev_class, 0, sizeof(hdev->dev_class));
 
@@ -1854,6 +1857,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
        for (i = 0; i < NUM_REASSEMBLY; i++)
                kfree_skb(hdev->reassembly[i]);
 
+       cancel_work_sync(&hdev->power_on);
+
        if (!test_bit(HCI_INIT, &hdev->flags) &&
            !test_bit(HCI_SETUP, &hdev->dev_flags)) {
                hci_dev_lock(hdev);
This page took 0.032595 seconds and 5 git commands to generate.