aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/hci.h3
-rw-r--r--include/net/bluetooth/hci_core.h3
-rw-r--r--net/bluetooth/hci_core.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5f3782204359..5004e36d0a66 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -219,6 +219,9 @@ enum {
219#define LMP_INQ_TX_PWR 0x02 219#define LMP_INQ_TX_PWR 0x02
220#define LMP_EXTFEATURES 0x80 220#define LMP_EXTFEATURES 0x80
221 221
222/* Extended LMP features */
223#define LMP_HOST_LE 0x02
224
222/* Connection modes */ 225/* Connection modes */
223#define HCI_CM_ACTIVE 0x0000 226#define HCI_CM_ACTIVE 0x0000
224#define HCI_CM_HOLD 0x0001 227#define HCI_CM_HOLD 0x0001
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index eb7fe99979e1..bb57bcadf484 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -578,6 +578,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
578#define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH) 578#define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH)
579#define lmp_le_capable(dev) ((dev)->features[4] & LMP_LE) 579#define lmp_le_capable(dev) ((dev)->features[4] & LMP_LE)
580 580
581/* ----- Extended LMP capabilities ----- */
582#define lmp_host_le_capable(dev) ((dev)->extfeatures[0] & LMP_HOST_LE)
583
581/* ----- HCI protocols ----- */ 584/* ----- HCI protocols ----- */
582struct hci_proto { 585struct hci_proto {
583 char *name; 586 char *name;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index cd59b849d055..886cc44e1717 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -542,7 +542,7 @@ int hci_dev_open(__u16 dev)
542 ret = __hci_request(hdev, hci_init_req, 0, 542 ret = __hci_request(hdev, hci_init_req, 0,
543 msecs_to_jiffies(HCI_INIT_TIMEOUT)); 543 msecs_to_jiffies(HCI_INIT_TIMEOUT));
544 544
545 if (lmp_le_capable(hdev)) 545 if (lmp_host_le_capable(hdev))
546 ret = __hci_request(hdev, hci_le_init_req, 0, 546 ret = __hci_request(hdev, hci_le_init_req, 0,
547 msecs_to_jiffies(HCI_INIT_TIMEOUT)); 547 msecs_to_jiffies(HCI_INIT_TIMEOUT));
548 548