summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-02-20 21:47:49 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-20 22:08:17 +0100
commitd7b7e79688c07b445bc52adfedf9a176be156f4b (patch)
tree0bdc072b86cfcf7a35b29e52336001ce2817de31 /net/bluetooth/mgmt.c
parentBluetooth: Restrict access to management interface (diff)
downloadlinux-d7b7e79688c07b445bc52adfedf9a176be156f4b.tar.xz
linux-d7b7e79688c07b445bc52adfedf9a176be156f4b.zip
Bluetooth: Set supported settings based on enabled HS and/or LE
Since neither High Speed (HS) nor Low Energy (LE) are fully implemented yet, only expose them in supported settings when enabled. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/bluetooth/mgmt.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index bc71b45ef4e5..f7c2969d8829 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -34,6 +34,9 @@
#include <net/bluetooth/mgmt.h>
#include <net/bluetooth/smp.h>
+bool enable_hs;
+bool enable_le;
+
#define MGMT_VERSION 1
#define MGMT_REVISION 0
@@ -374,8 +377,13 @@ static u32 get_supported_settings(struct hci_dev *hdev)
settings |= MGMT_SETTING_LINK_SECURITY;
}
- if (hdev->features[4] & LMP_LE)
- settings |= MGMT_SETTING_LE;
+ if (enable_hs)
+ settings |= MGMT_SETTING_HS;
+
+ if (enable_le) {
+ if (hdev->features[4] & LMP_LE)
+ settings |= MGMT_SETTING_LE;
+ }
return settings;
}
@@ -3421,3 +3429,9 @@ int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
return mgmt_event(MGMT_EV_DEVICE_UNBLOCKED, hdev, &ev, sizeof(ev),
cmd ? cmd->sk : NULL);
}
+
+module_param(enable_hs, bool, 0644);
+MODULE_PARM_DESC(enable_hs, "Enable High Speed support");
+
+module_param(enable_le, bool, 0644);
+MODULE_PARM_DESC(enable_le, "Enable Low Energy support");