summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-06-15 06:28:42 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-06-15 06:28:42 +0000
commit57290a1e2c13f79d353a21f7c67388ee8c142897 (patch)
tree327901a64e8c58c24ad60a86cb7ffce8ce89f5f9
parent5ed2a3ba745856206c66d8ecb98afb8a1f9ec7b5 (diff)
Add setting of event mask
-rw-r--r--hcid/device.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hcid/device.c b/hcid/device.c
index 920a4dad..db31f87a 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -204,6 +204,7 @@ int start_device(uint16_t dev_id)
struct hci_dev *dev;
struct hci_version ver;
uint8_t features[8], inqmode;
+ uint8_t events[8] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00 };
int dd, err;
ASSERT_DEV_ID;
@@ -263,6 +264,20 @@ int start_device(uint16_t dev_id)
return -err;
}
+ if (ver.hci_rev > 1) {
+ if (features[5] & LMP_SNIFF_SUBR)
+ events[5] |= 0x20;
+
+ if (features[6] & LMP_EXT_INQ)
+ events[5] |= 0x40;
+
+ if (features[7] & LMP_LSTO)
+ events[6] |= 0x80;
+
+ hci_send_cmd(dd, OGF_HOST_CTL, OCF_SET_EVENT_MASK,
+ sizeof(events), events);
+ }
+
done:
hci_close_dev(dd);