diff options
Diffstat (limited to 'hcid/device.c')
-rw-r--r-- | hcid/device.c | 15 |
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); |