From 3f23c2518b1e1f3f3d691781952aa6b17f237c85 Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Thu, 30 Jun 2011 19:20:55 -0300 Subject: [PATCH] --- yaml --- r: 256399 b: refs/heads/master c: eead27da60df80a112d1ac3ea482226e9794c26b h: refs/heads/master i: 256397: 5831d8d24376d9bc753866efcd8c652cbc85b7fd 256395: b6c99181c6586d56f3d6c84ac96739f084a7e94c 256391: 7fdaec0e0eac1a12a59c4235a6d92205bf4285e9 256383: 635bb61490a072b05c589907096bb276b2d9dc88 v: v3 --- [refs] | 2 +- trunk/include/net/bluetooth/hci.h | 3 +++ trunk/include/net/bluetooth/hci_core.h | 3 +++ trunk/net/bluetooth/hci_core.c | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 073309935e01..d6025f4c6756 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e6100a2541987b84af37e4c4247d989644a3aa69 +refs/heads/master: eead27da60df80a112d1ac3ea482226e9794c26b diff --git a/trunk/include/net/bluetooth/hci.h b/trunk/include/net/bluetooth/hci.h index 5f3782204359..5004e36d0a66 100644 --- a/trunk/include/net/bluetooth/hci.h +++ b/trunk/include/net/bluetooth/hci.h @@ -219,6 +219,9 @@ enum { #define LMP_INQ_TX_PWR 0x02 #define LMP_EXTFEATURES 0x80 +/* Extended LMP features */ +#define LMP_HOST_LE 0x02 + /* Connection modes */ #define HCI_CM_ACTIVE 0x0000 #define HCI_CM_HOLD 0x0001 diff --git a/trunk/include/net/bluetooth/hci_core.h b/trunk/include/net/bluetooth/hci_core.h index eb7fe99979e1..bb57bcadf484 100644 --- a/trunk/include/net/bluetooth/hci_core.h +++ b/trunk/include/net/bluetooth/hci_core.h @@ -578,6 +578,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn); #define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH) #define lmp_le_capable(dev) ((dev)->features[4] & LMP_LE) +/* ----- Extended LMP capabilities ----- */ +#define lmp_host_le_capable(dev) ((dev)->extfeatures[0] & LMP_HOST_LE) + /* ----- HCI protocols ----- */ struct hci_proto { char *name; diff --git a/trunk/net/bluetooth/hci_core.c b/trunk/net/bluetooth/hci_core.c index cd59b849d055..886cc44e1717 100644 --- a/trunk/net/bluetooth/hci_core.c +++ b/trunk/net/bluetooth/hci_core.c @@ -542,7 +542,7 @@ int hci_dev_open(__u16 dev) ret = __hci_request(hdev, hci_init_req, 0, msecs_to_jiffies(HCI_INIT_TIMEOUT)); - if (lmp_le_capable(hdev)) + if (lmp_host_le_capable(hdev)) ret = __hci_request(hdev, hci_le_init_req, 0, msecs_to_jiffies(HCI_INIT_TIMEOUT));