summaryrefslogtreecommitdiffstats
path: root/hcid/device.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-06-17 11:26:02 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-06-17 11:26:02 +0000
commit57eb59510dc89b134cc35bdac9949bceab7da1d6 (patch)
tree862fe19568169fab13a4fb42432ca320185248a4 /hcid/device.c
parentb296f5081912b00dd837109c44625e26734fbf3a (diff)
Ignore devices in raw mode
Diffstat (limited to 'hcid/device.c')
-rw-r--r--hcid/device.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/hcid/device.c b/hcid/device.c
index 987fa0c0..01262f0c 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -71,6 +71,8 @@ struct hci_conn {
};
struct hci_dev {
+ int ignore;
+
bdaddr_t bdaddr;
uint8_t features[8];
uint8_t lmp_ver;
@@ -105,8 +107,15 @@ int add_device(uint16_t dev_id)
dev = &devices[dev_id];
- if (hci_devinfo(dev_id, &di) < 0)
+ if (hci_devinfo(dev_id, &di) < 0) {
+ dev->ignore = 1;
return -errno;
+ }
+
+ if (hci_test_bit(HCI_RAW, &di.flags)) {
+ info("Device hci%d is using raw mode", dev_id);
+ dev->ignore = 1;
+ }
bacpy(&dev->bdaddr, &di.bdaddr);
memcpy(dev->features, di.features, 8);
@@ -157,6 +166,9 @@ int start_device(uint16_t dev_id)
dev = &devices[dev_id];
+ if (dev->ignore)
+ return 0;
+
dd = hci_open_dev(dev_id);
if (dd < 0) {
error("Can't open device hci%d",