mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices
Some old hci controllers do not accept any mask so leave the default mask on for these devices. < HCI Command: Set Event Mask (0x03|0x0001) plen 8 Mask: 0xfffffbff00000000 > HCI Event: Command Complete (0x0e) plen 4 Set Event Mask (0x03|0x0001) ncmd 1 status 0x12 Error: Invalid HCI Command Parameters Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Tested-by: Corey Boyle <corey@kansanian.com> Tested-by: Ed Tomlinson <edt@aei.ca> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
0b28d73735
commit
6de6c18d8d
@ -477,14 +477,16 @@ static void hci_setup_event_mask(struct hci_dev *hdev)
|
|||||||
* command otherwise */
|
* command otherwise */
|
||||||
u8 events[8] = { 0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x00, 0x00 };
|
u8 events[8] = { 0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
/* Events for 1.2 and newer controllers */
|
/* CSR 1.1 dongles does not accept any bitfield so don't try to set
|
||||||
if (hdev->lmp_ver > 1) {
|
* any event mask for pre 1.2 devices */
|
||||||
events[4] |= 0x01; /* Flow Specification Complete */
|
if (hdev->lmp_ver <= 1)
|
||||||
events[4] |= 0x02; /* Inquiry Result with RSSI */
|
return;
|
||||||
events[4] |= 0x04; /* Read Remote Extended Features Complete */
|
|
||||||
events[5] |= 0x08; /* Synchronous Connection Complete */
|
events[4] |= 0x01; /* Flow Specification Complete */
|
||||||
events[5] |= 0x10; /* Synchronous Connection Changed */
|
events[4] |= 0x02; /* Inquiry Result with RSSI */
|
||||||
}
|
events[4] |= 0x04; /* Read Remote Extended Features Complete */
|
||||||
|
events[5] |= 0x08; /* Synchronous Connection Complete */
|
||||||
|
events[5] |= 0x10; /* Synchronous Connection Changed */
|
||||||
|
|
||||||
if (hdev->features[3] & LMP_RSSI_INQ)
|
if (hdev->features[3] & LMP_RSSI_INQ)
|
||||||
events[4] |= 0x04; /* Inquiry Result with RSSI */
|
events[4] |= 0x04; /* Inquiry Result with RSSI */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user