* [PATCH 1/2] Bluetooth: Enable Low Energy support by default
@ 2012-05-03 5:12 Marcel Holtmann
2012-05-03 6:43 ` Gustavo Padovan
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2012-05-03 5:12 UTC (permalink / raw)
To: linux-bluetooth
The Bluetooth Low Energy support so far was disabled by default via
a module parameter. With this change the module parameter will be removed
and Low Energy is enabled by default.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
include/net/bluetooth/hci.h | 1 -
net/bluetooth/hci_event.c | 2 +-
net/bluetooth/mgmt.c | 12 +++---------
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 346f087..66a7b57 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -1438,6 +1438,5 @@ struct hci_inquiry_req {
#define IREQ_CACHE_FLUSH 0x0001
extern bool enable_hs;
-extern bool enable_le;
#endif /* __HCI_H */
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 507fcec..b739baf 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -725,7 +725,7 @@ static void hci_set_le_support(struct hci_dev *hdev)
memset(&cp, 0, sizeof(cp));
- if (enable_le && test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
+ if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
cp.le = 1;
cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR);
}
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 79e7770..ea170d2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -35,7 +35,6 @@
#include <net/bluetooth/smp.h>
bool enable_hs;
-bool enable_le;
#define MGMT_VERSION 1
#define MGMT_REVISION 1
@@ -384,10 +383,8 @@ static u32 get_supported_settings(struct hci_dev *hdev)
if (enable_hs)
settings |= MGMT_SETTING_HS;
- if (enable_le) {
- if (hdev->features[4] & LMP_LE)
- settings |= MGMT_SETTING_LE;
- }
+ if (hdev->features[4] & LMP_LE)
+ settings |= MGMT_SETTING_LE;
return settings;
}
@@ -1199,7 +1196,7 @@ static int set_le(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
hci_dev_lock(hdev);
- if (!enable_le || !(hdev->features[4] & LMP_LE)) {
+ if (!(hdev->features[4] & LMP_LE)) {
err = cmd_status(sk, hdev->id, MGMT_OP_SET_LE,
MGMT_STATUS_NOT_SUPPORTED);
goto unlock;
@@ -3657,6 +3654,3 @@ int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
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");
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Enable Low Energy support by default
2012-05-03 5:12 [PATCH 1/2] Bluetooth: Enable Low Energy support by default Marcel Holtmann
@ 2012-05-03 6:43 ` Gustavo Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-05-03 6:43 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
* Marcel Holtmann <marcel@holtmann.org> [2012-05-03 07:12:31 +0200]:
> The Bluetooth Low Energy support so far was disabled by default via
> a module parameter. With this change the module parameter will be removed
> and Low Energy is enabled by default.
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
> include/net/bluetooth/hci.h | 1 -
> net/bluetooth/hci_event.c | 2 +-
> net/bluetooth/mgmt.c | 12 +++---------
> 3 files changed, 4 insertions(+), 11 deletions(-)
Patch has been applied to bluetooth-next. thanks.
Gustavo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-03 6:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 5:12 [PATCH 1/2] Bluetooth: Enable Low Energy support by default Marcel Holtmann
2012-05-03 6:43 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).