summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2013-03-15 23:06:58 +0100
committerGustavo Padovan2013-03-18 18:02:02 +0100
commitf9f85279fd3a3284023231c7f0796f98c417e7cd (patch)
treeaab2961c8aaf39789c70b1eeed61966ca052e66d /net/bluetooth/hci_core.c
parentBluetooth: Add a define for the HCI persistent flags mask (diff)
downloadkernel-qcow2-linux-f9f85279fd3a3284023231c7f0796f98c417e7cd.tar.gz
kernel-qcow2-linux-f9f85279fd3a3284023231c7f0796f98c417e7cd.tar.xz
kernel-qcow2-linux-f9f85279fd3a3284023231c7f0796f98c417e7cd.zip
Bluetooth: Clear non-persistent flags when closing HCI device
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 <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 02070dcdfbbb..059bbae534d1 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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;