summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-10-21 15:51:53 +0200
committerMarcel Holtmann <marcel@holtmann.org>2013-10-21 16:18:27 +0200
commit547003b114bcb96555cf73ec7f45ab64b2dcaf67 (patch)
tree1dfd0aeae3aa9d4e3182cd6ba0a113796e3a98bd /net
parentBluetooth: Update Set Discoverable to support LE (diff)
downloadlinux-547003b114bcb96555cf73ec7f45ab64b2dcaf67.tar.xz
linux-547003b114bcb96555cf73ec7f45ab64b2dcaf67.zip
Bluetooth: Fix enabling fast connectable on LE-only controllers
The current "fast connectable" feature is BR/EDR-only, so add a proper check for BR/EDR support before proceeding with the associated HCI commands. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index bd91ee5f130c..074d83690a41 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1307,6 +1307,9 @@ static void write_fast_connectable(struct hci_request *req, bool enable)
struct hci_cp_write_page_scan_activity acp;
u8 type;
+ if (!test_bit(HCI_BREDR_ENABLED, &hdev->dev_flags))
+ return;
+
if (hdev->hci_ver < BLUETOOTH_VER_1_2)
return;