]> www.infradead.org Git - users/hch/misc.git/commitdiff
Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken
authorPedro Nishiyama <nishiyama.pedro@gmail.com>
Sat, 1 Mar 2025 06:23:00 +0000 (03:23 -0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 16:44:15 +0000 (12:44 -0400)
A SCO connection without the proper voice_setting can cause
the controller to lock up.

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

index 903b0b52692aa62a849311c4cc3cdb5e999f5805..19e19c9f5e68a70458745feedbe9a9782785da0e 100644 (file)
@@ -930,6 +930,9 @@ static u8 hci_cc_read_buffer_size(struct hci_dev *hdev, void *data,
                hdev->sco_pkts = 8;
        }
 
+       if (!read_voice_setting_capable(hdev))
+               hdev->sco_pkts = 0;
+
        hdev->acl_cnt = hdev->acl_pkts;
        hdev->sco_cnt = hdev->sco_pkts;