From 57eb59510dc89b134cc35bdac9949bceab7da1d6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 17 Jun 2006 11:26:02 +0000 Subject: Ignore devices in raw mode --- hcid/device.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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", -- cgit