diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-08-13 13:00:54 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-08-21 10:47:05 -0400 |
commit | c7882cbd1151011ca8e6fb13530cd09eae1c39ee (patch) | |
tree | 9cbcfee21ab4956aaaab175b16f122708857313e /net/bluetooth/hci_core.c | |
parent | 9d225d2208a6f17da5987ff4e7710b9e805cb5d6 (diff) |
Bluetooth: Set different event mask for LE-only controllers
In case of a Low Energy only controller it makes no sense to configure
the full BR/EDR event mask. It will just enable events that can not be
send anyway and there is no guarantee that such a controller will accept
this value.
Use event mask 0x90 0xe8 0x04 0x02 0x00 0x80 0x00 0x20 for LE-only
controllers which enables the following events:
Disconnection Complete
Encryption Change
Read Remote Version Information Complete
Command Complete
Command Status
Hardware Error
Number of Completed Packets
Data Buffer Overflow
Encryption Key Refresh Complete
LE Meta
This is according to Core Specification, Part E, Section 3.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b821b199b333..8d9b87df292f 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -454,6 +454,18 @@ static void hci_setup_event_mask(struct hci_request *req) | |||
454 | events[4] |= 0x04; /* Read Remote Extended Features Complete */ | 454 | events[4] |= 0x04; /* Read Remote Extended Features Complete */ |
455 | events[5] |= 0x08; /* Synchronous Connection Complete */ | 455 | events[5] |= 0x08; /* Synchronous Connection Complete */ |
456 | events[5] |= 0x10; /* Synchronous Connection Changed */ | 456 | events[5] |= 0x10; /* Synchronous Connection Changed */ |
457 | } else { | ||
458 | /* Use a different default for LE-only devices */ | ||
459 | memset(events, 0, sizeof(events)); | ||
460 | events[0] |= 0x10; /* Disconnection Complete */ | ||
461 | events[0] |= 0x80; /* Encryption Change */ | ||
462 | events[1] |= 0x08; /* Read Remote Version Information Complete */ | ||
463 | events[1] |= 0x20; /* Command Complete */ | ||
464 | events[1] |= 0x40; /* Command Status */ | ||
465 | events[1] |= 0x80; /* Hardware Error */ | ||
466 | events[2] |= 0x04; /* Number of Completed Packets */ | ||
467 | events[3] |= 0x02; /* Data Buffer Overflow */ | ||
468 | events[5] |= 0x80; /* Encryption Key Refresh Complete */ | ||
457 | } | 469 | } |
458 | 470 | ||
459 | if (lmp_inq_rssi_capable(hdev)) | 471 | if (lmp_inq_rssi_capable(hdev)) |