]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Fix connectable and discoverable supported settings values
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 8 Jul 2014 13:07:34 +0000 (16:07 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 8 Jul 2014 13:09:46 +0000 (15:09 +0200)
The connectable and discoverable mgmt settings are supported both for LE
and BR/EDR controllers so they do not belong behind a lmp_bredr_capable()
condition. This patch fixes the issue in get_supported_settings().

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

index a4232bc237f375d9757fc4031df42693efe44222..376b164c5250d4de0b8f5e6820f6976941b452a6 100644 (file)
@@ -555,12 +555,12 @@ static u32 get_supported_settings(struct hci_dev *hdev)
        settings |= MGMT_SETTING_POWERED;
        settings |= MGMT_SETTING_PAIRABLE;
        settings |= MGMT_SETTING_DEBUG_KEYS;
+       settings |= MGMT_SETTING_CONNECTABLE;
+       settings |= MGMT_SETTING_DISCOVERABLE;
 
        if (lmp_bredr_capable(hdev)) {
-               settings |= MGMT_SETTING_CONNECTABLE;
                if (hdev->hci_ver >= BLUETOOTH_VER_1_2)
                        settings |= MGMT_SETTING_FAST_CONNECTABLE;
-               settings |= MGMT_SETTING_DISCOVERABLE;
                settings |= MGMT_SETTING_BREDR;
                settings |= MGMT_SETTING_LINK_SECURITY;