]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:28 +0000 (11:12 +0200)
[ Upstream commit 14d17c78a4b1660c443bae9d38c814edea506f62 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_event.c

index ab940ec698c0f565b783c4bb186462caa10d50b0..7152a1ca56778a8c1a47aa750a2063fa00863df1 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;