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_VOICE_SETTING

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

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
ff26b2dd b9465e66

+15
+8
include/net/bluetooth/hci.h
··· 354 354 * during the hdev->setup vendor callback. 355 355 */ 356 356 HCI_QUIRK_FIXUP_LE_EXT_ADV_REPORT_PHY, 357 + 358 + /* When this quirk is set, the HCI_OP_READ_VOICE_SETTING command is 359 + * skipped. This is required for a subset of the CSR controller clones 360 + * which erroneously claim to support it. 361 + * 362 + * This quirk must be set before hci_register_dev is called. 363 + */ 364 + HCI_QUIRK_BROKEN_READ_VOICE_SETTING, 357 365 }; 358 366 359 367 /* HCI device flags */
+4
include/net/bluetooth/hci_core.h
··· 1925 1925 ((dev)->commands[20] & 0x10 && \ 1926 1926 !test_bit(HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE, &hdev->quirks)) 1927 1927 1928 + #define read_voice_setting_capable(dev) \ 1929 + ((dev)->commands[9] & 0x04 && \ 1930 + !test_bit(HCI_QUIRK_BROKEN_READ_VOICE_SETTING, &(dev)->quirks)) 1931 + 1928 1932 /* Use enhanced synchronous connection if command is supported and its quirk 1929 1933 * has not been set. 1930 1934 */
+3
net/bluetooth/hci_sync.c
··· 3696 3696 /* Read Voice Setting */ 3697 3697 static int hci_read_voice_setting_sync(struct hci_dev *hdev) 3698 3698 { 3699 + if (!read_voice_setting_capable(hdev)) 3700 + return 0; 3701 + 3699 3702 return __hci_cmd_sync_status(hdev, HCI_OP_READ_VOICE_SETTING, 3700 3703 0, NULL, HCI_CMD_TIMEOUT); 3701 3704 }