aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 059bbae534d1..9e87a91562a6 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1130,6 +1130,10 @@ static int hci_dev_do_close(struct hci_dev *hdev)
1130 * and no tasks are scheduled. */ 1130 * and no tasks are scheduled. */
1131 hdev->close(hdev); 1131 hdev->close(hdev);
1132 1132
1133 /* Clear flags */
1134 hdev->flags = 0;
1135 hdev->dev_flags &= ~HCI_PERSISTENT_MASK;
1136
1133 if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags) && 1137 if (!test_and_clear_bit(HCI_AUTO_OFF, &hdev->dev_flags) &&
1134 mgmt_valid_hdev(hdev)) { 1138 mgmt_valid_hdev(hdev)) {
1135 hci_dev_lock(hdev); 1139 hci_dev_lock(hdev);
@@ -1137,10 +1141,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
1137 hci_dev_unlock(hdev); 1141 hci_dev_unlock(hdev);
1138 } 1142 }
1139 1143
1140 /* Clear flags */
1141 hdev->flags = 0;
1142 hdev->dev_flags &= ~HCI_PERSISTENT_MASK;
1143
1144 /* Controller radio is available but is currently powered down */ 1144 /* Controller radio is available but is currently powered down */
1145 hdev->amp_status = 0; 1145 hdev->amp_status = 0;
1146 1146