|
@@ -1130,6 +1130,10 @@ static int hci_dev_do_close(struct hci_dev *hdev)
|
|
|
* and no tasks are scheduled. */
|
|
|
hdev->close(hdev);
|
|
|
|
|
|
+ /* Clear flags */
|
|
|
+ hdev->flags = 0;
|
|
|
+ hdev->dev_flags &= ~HCI_PERSISTENT_MASK;
|
|
|
+
|
|
|
if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags) &&
|
|
|
mgmt_valid_hdev(hdev)) {
|
|
|
hci_dev_lock(hdev);
|
|
@@ -1137,10 +1141,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
|
|
|
hci_dev_unlock(hdev);
|
|
|
}
|
|
|
|
|
|
- /* Clear flags */
|
|
|
- hdev->flags = 0;
|
|
|
- hdev->dev_flags &= ~HCI_PERSISTENT_MASK;
|
|
|
-
|
|
|
/* Controller radio is available but is currently powered down */
|
|
|
hdev->amp_status = 0;
|
|
|
|