From 57290a1e2c13f79d353a21f7c67388ee8c142897 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 15 Jun 2007 06:28:42 +0000 Subject: Add setting of event mask --- hcid/device.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'hcid') 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); -- cgit