Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8af59467 authored by Johan Hedberg's avatar Johan Hedberg
Browse files

Bluetooth: Add missing QUIRK_NO_RESET test to hci_dev_do_close



We should only perform a reset in hci_dev_do_close if the
HCI_QUIRK_NO_RESET flag is set (since in such a case a reset will not be
performed when initializing the device).

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 63d2bc1b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -767,7 +767,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
	/* Reset device */
	skb_queue_purge(&hdev->cmd_q);
	atomic_set(&hdev->cmd_cnt, 1);
	if (!test_bit(HCI_RAW, &hdev->flags)) {
	if (!test_bit(HCI_RAW, &hdev->flags) &&
				test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) {
		set_bit(HCI_INIT, &hdev->flags);
		__hci_request(hdev, hci_reset_req, 0,
					msecs_to_jiffies(250));