Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Enable Low Energy support by default

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>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>

authored by

Marcel Holtmann and committed by
Gustavo Padovan
9d42820f 2ee8ce35

+4 -11
-1
include/net/bluetooth/hci.h
··· 1438 1438 #define IREQ_CACHE_FLUSH 0x0001 1439 1439 1440 1440 extern bool enable_hs; 1441 - extern bool enable_le; 1442 1441 1443 1442 #endif /* __HCI_H */
+1 -1
net/bluetooth/hci_event.c
··· 725 725 726 726 memset(&cp, 0, sizeof(cp)); 727 727 728 - if (enable_le && test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) { 728 + if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) { 729 729 cp.le = 1; 730 730 cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR); 731 731 }
+3 -9
net/bluetooth/mgmt.c
··· 35 35 #include <net/bluetooth/smp.h> 36 36 37 37 bool enable_hs; 38 - bool enable_le; 39 38 40 39 #define MGMT_VERSION 1 41 40 #define MGMT_REVISION 1 ··· 383 384 if (enable_hs) 384 385 settings |= MGMT_SETTING_HS; 385 386 386 - if (enable_le) { 387 - if (hdev->features[4] & LMP_LE) 388 - settings |= MGMT_SETTING_LE; 389 - } 387 + if (hdev->features[4] & LMP_LE) 388 + settings |= MGMT_SETTING_LE; 390 389 391 390 return settings; 392 391 } ··· 1196 1199 1197 1200 hci_dev_lock(hdev); 1198 1201 1199 - if (!enable_le || !(hdev->features[4] & LMP_LE)) { 1202 + if (!(hdev->features[4] & LMP_LE)) { 1200 1203 err = cmd_status(sk, hdev->id, MGMT_OP_SET_LE, 1201 1204 MGMT_STATUS_NOT_SUPPORTED); 1202 1205 goto unlock; ··· 3654 3657 3655 3658 module_param(enable_hs, bool, 0644); 3656 3659 MODULE_PARM_DESC(enable_hs, "Enable High Speed support"); 3657 - 3658 - module_param(enable_le, bool, 0644); 3659 - MODULE_PARM_DESC(enable_le, "Enable Low Energy support");