summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2012-02-03 20:29:40 +0100
committerJohan Hedberg2012-02-13 16:01:34 +0100
commit8af59467412b4b61850d3ccb3737c09ecc6dc100 (patch)
tree602bcf2ebbc6f1b6152cc92f2fcdf87b0fb6325f /net/bluetooth/hci_core.c
parentBluetooth: Helper removes duplicated code (diff)
downloadkernel-qcow2-linux-8af59467412b4b61850d3ccb3737c09ecc6dc100.tar.gz
kernel-qcow2-linux-8af59467412b4b61850d3ccb3737c09ecc6dc100.tar.xz
kernel-qcow2-linux-8af59467412b4b61850d3ccb3737c09ecc6dc100.zip
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/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 95eeae59812d..8bffd3eb344d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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));