Bluetooth: Clear non-persistent flags when closing HCI device
authorJohan Hedberg <[email protected]>
Fri, 15 Mar 2013 22:06:58 +0000 (17:06 -0500)
committerGustavo Padovan <[email protected]>
Mon, 18 Mar 2013 17:02:02 +0000 (14:02 -0300)
When hci_dev_do_close() is called we should make sure to clear all
non-persistent flags in hci->dev_flags.

Signed-off-by: Johan Hedberg <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
net/bluetooth/hci_core.c

index 02070dcdfbbb6bfbdf981931352eba089fb1d962..059bbae534d169aac27327c5dfd04ea7e7756d9f 100644 (file)
@@ -1139,6 +1139,7 @@ static int hci_dev_do_close(struct hci_dev *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;