[PATCH 1/9] Bluetooth: Fix persistency of the HCI_MGMT flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johan Hedberg <johan.hedberg@xxxxxxxxx>

The HCI_MGMT flag needs to remain set even after closing an HCI device.

Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
---
 net/bluetooth/hci_core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 6d38d80..52edc11 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -670,8 +670,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
 	mgmt_powered(hdev, 0);
 	hci_dev_unlock(hdev);
 
-	/* Clear flags */
-	hdev->flags = 0;
+	/* Clear flags, except persistent ones like HCI_MGMT */
+	hdev->flags &= BIT(HCI_MGMT);
 
 	hci_req_unlock(hdev);
 
-- 
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux