diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-03 14:29:40 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-15 06:09:26 -0500 |
commit | ca0d6c7ece0e78268cd7c5c378d6b1b610625085 (patch) | |
tree | 23c56a6629b63e20c59ba36971fd181d54c02b6d /net | |
parent | cf33e77b76d7439f21a23a94eab4ab3b405a6a7d (diff) |
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: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 9de93714213a..5aeb62491198 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -640,7 +640,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
640 | /* Reset device */ | 640 | /* Reset device */ |
641 | skb_queue_purge(&hdev->cmd_q); | 641 | skb_queue_purge(&hdev->cmd_q); |
642 | atomic_set(&hdev->cmd_cnt, 1); | 642 | atomic_set(&hdev->cmd_cnt, 1); |
643 | if (!test_bit(HCI_RAW, &hdev->flags)) { | 643 | if (!test_bit(HCI_RAW, &hdev->flags) && |
644 | test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) { | ||
644 | set_bit(HCI_INIT, &hdev->flags); | 645 | set_bit(HCI_INIT, &hdev->flags); |
645 | __hci_request(hdev, hci_reset_req, 0, | 646 | __hci_request(hdev, hci_reset_req, 0, |
646 | msecs_to_jiffies(250)); | 647 | msecs_to_jiffies(250)); |