summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2011-06-30 19:20:55 -0300
committerJaikumar Ganesh <jaikumar@google.com>2011-07-11 11:59:33 -0700
commitc006aa0c5627e27e6cc422636a4744c43cbd5dc9 (patch)
tree150475cce78b762662f17f54a76f6d59a23a8e84 /include/net
parent5521abe082c05a39479d0441b883ddcec1d57765 (diff)
Bluetooth: Add lmp_host_le_capable() macro
Since we have the extended LMP features properly implemented, we should check the LMP_HOST_LE bit to know if the host supports LE. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h3
-rw-r--r--include/net/bluetooth/hci_core.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 443320072a8..b68cd61f296 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -221,6 +221,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/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 7b4bd049673..695ef3b8698 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -580,6 +580,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;