Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: Add quirk for broken READ_PAGE_SCAN_TYPE

Some fake controllers cannot be initialized because they return a smaller
report than expected for READ_PAGE_SCAN_TYPE.

Signed-off-by: Pedro Nishiyama <nishiyama.pedro@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Pedro Nishiyama and committed by
Luiz Augusto von Dentz
12788133 ff26b2dd

+10 -1
+8
include/net/bluetooth/hci.h
··· 362 362 * This quirk must be set before hci_register_dev is called. 363 363 */ 364 364 HCI_QUIRK_BROKEN_READ_VOICE_SETTING, 365 + 366 + /* When this quirk is set, the HCI_OP_READ_PAGE_SCAN_TYPE command is 367 + * skipped. This is required for a subset of the CSR controller clones 368 + * which erroneously claim to support it. 369 + * 370 + * This quirk must be set before hci_register_dev is called. 371 + */ 372 + HCI_QUIRK_BROKEN_READ_PAGE_SCAN_TYPE, 365 373 }; 366 374 367 375 /* HCI device flags */
+2 -1
net/bluetooth/hci_sync.c
··· 4132 4132 * support the Read Page Scan Type command. Check support for 4133 4133 * this command in the bit mask of supported commands. 4134 4134 */ 4135 - if (!(hdev->commands[13] & 0x01)) 4135 + if (!(hdev->commands[13] & 0x01) || 4136 + test_bit(HCI_QUIRK_BROKEN_READ_PAGE_SCAN_TYPE, &hdev->quirks)) 4136 4137 return 0; 4137 4138 4138 4139 return __hci_cmd_sync_status(hdev, HCI_OP_READ_PAGE_SCAN_TYPE,