|
@@ -535,6 +535,8 @@ int hci_dev_open(__u16 dev)
|
|
|
hci_dev_hold(hdev);
|
|
|
set_bit(HCI_UP, &hdev->flags);
|
|
|
hci_notify(hdev, HCI_DEV_UP);
|
|
|
+ if (!test_bit(HCI_SETUP, &hdev->flags))
|
|
|
+ mgmt_powered(hdev->id, 1);
|
|
|
} else {
|
|
|
/* Init failed, cleanup */
|
|
|
tasklet_kill(&hdev->rx_task);
|
|
@@ -616,6 +618,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
|
|
|
* and no tasks are scheduled. */
|
|
|
hdev->close(hdev);
|
|
|
|
|
|
+ mgmt_powered(hdev->id, 0);
|
|
|
+
|
|
|
/* Clear flags */
|
|
|
hdev->flags = 0;
|
|
|
|