summaryrefslogtreecommitdiff
path: root/src/hcid.h
diff options
context:
space:
mode:
authorDavid Scherba <dscherba@codeaurora.org>2010-08-10 15:51:44 -0400
committerJohan Hedberg <johan.hedberg@nokia.com>2010-08-10 16:03:18 -0400
commit65bf1321203b55b11167ac8b869da28a86ce49d2 (patch)
tree51dcb5cb33e2764ba47daa8e5adbc56856385695 /src/hcid.h
parentcf91577002b4b8acd4b984fad2f62215ae4a2aa0 (diff)
downloadbluez-65bf1321203b55b11167ac8b869da28a86ce49d2.tar.gz
Use HCI device type to gate BR/EDR-specific HCI commands
Use the hci_dev_info structure member 'type' to classify whether a HCI device is BR/EDR, or not. If not, gate BR/EDR-specific HCI commands.
Diffstat (limited to 'src/hcid.h')
-rw-r--r--src/hcid.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hcid.h b/src/hcid.h
index 9c5f1d65c..50bdb6564 100644
--- a/src/hcid.h
+++ b/src/hcid.h
@@ -23,6 +23,9 @@
*
*/
+#include <bluetooth/hci.h>
+#include <bluetooth/hci_lib.h>
+
/* When all services should trust a remote device */
#define GLOBAL_TRUST "[all]"
@@ -99,3 +102,8 @@ void rfkill_exit(void);
void __probe_servers(const char *adapter);
void __remove_servers(const char *adapter);
+
+static inline int ignore_device(struct hci_dev_info *di)
+{
+ return hci_test_bit(HCI_RAW, &di->flags) || di->type >> 4 != HCI_BREDR;
+}