From: Pedro Nishiyama Date: Sat, 1 Mar 2025 06:23:00 +0000 (-0300) Subject: Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken X-Git-Tag: v6.14.9~693 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec1f015ec0c6fd250a6564e8452f7bb3160b9cb1;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broken [ Upstream commit 14d17c78a4b1660c443bae9d38c814edea506f62 ] A SCO connection without the proper voice_setting can cause the controller to lock up. Signed-off-by: Pedro Nishiyama Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index ab940ec698c0f..7152a1ca56778 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -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;