Bluetooth: Do not set HCI_RAW when HS enabled
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Fri, 11 Nov 2011 15:02:15 +0000 (17:02 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Wed, 16 Nov 2011 18:54:29 +0000 (16:54 -0200)
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/hci_core.c

index fb3feeb..cf18f6d 100644 (file)
@@ -521,8 +521,9 @@ int hci_dev_open(__u16 dev)
        if (test_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks))
                set_bit(HCI_RAW, &hdev->flags);
 
-       /* Treat all non BR/EDR controllers as raw devices for now */
-       if (hdev->dev_type != HCI_BREDR)
+       /* Treat all non BR/EDR controllers as raw devices if
+          enable_hs is not set */
+       if (hdev->dev_type != HCI_BREDR && !enable_hs)
                set_bit(HCI_RAW, &hdev->flags);
 
        if (hdev->open(hdev)) {