Bluetooth: Use explicit check for BR/EDR device type
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 6 Oct 2013 08:16:22 +0000 (01:16 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Oct 2013 09:00:40 +0000 (11:00 +0200)
The BR/EDR and LE setup procedures apply only to BR/EDR device types
and so check for that explicitly. Checking that it is not an AMP
controller is dangerous in case there will be ever a third device
type.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_core.c

index 4a9b8dd..bf3c5b0 100644 (file)
@@ -2357,7 +2357,7 @@ int hci_register_dev(struct hci_dev *hdev)
 
        set_bit(HCI_SETUP, &hdev->dev_flags);
 
-       if (hdev->dev_type != HCI_AMP) {
+       if (hdev->dev_type == HCI_BREDR) {
                set_bit(HCI_AUTO_OFF, &hdev->dev_flags);
                /* Assume BR/EDR support until proven otherwise (such as
                 * through reading supported features during init.