]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Bluetooth: Fix clearing of persistent dev_flags
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 21 Feb 2012 15:55:47 +0000 (17:55 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 21 Feb 2012 18:04:39 +0000 (20:04 +0200)
Now that most flags are persistent, only the LE_SCAN flag should be
cleared after a reset.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index 5d0f92a948c24882137f0d77a3eb92497c5cc3bc..2a5d05c05e35a6b98f4ddbc2aab330167293da8f 100644 (file)
@@ -192,9 +192,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb)
 
        hci_req_complete(hdev, HCI_OP_RESET, status);
 
-       /* Reset all flags, except persistent ones */
-       hdev->dev_flags &= BIT(HCI_MGMT) | BIT(HCI_SETUP) | BIT(HCI_AUTO_OFF) |
-                               BIT(HCI_LINK_KEYS) | BIT(HCI_DEBUG_KEYS);
+       /* Reset all non-persistent flags */
+       hdev->dev_flags &= ~(BIT(HCI_LE_SCAN));
 }
 
 static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb)