Skip to content

Commit c1631db

Browse files
committed
Bluetooth: hci_sync: Fix hci_read_buffer_size_sync
hci_read_buffer_size_sync shall not use HCI_OP_LE_READ_BUFFER_SIZE_V2 sinze that is LE specific, instead it is hci_le_read_buffer_size_sync version that shall use it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216382 Fixes: 26afbd8 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent af6bcc1 commit c1631db

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

net/bluetooth/hci_sync.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,12 +3339,6 @@ static const struct hci_init_stage amp_init2[] = {
33393339
/* Read Buffer Size (ACL mtu, max pkt, etc.) */
33403340
static int hci_read_buffer_size_sync(struct hci_dev *hdev)
33413341
{
3342-
/* Use Read LE Buffer Size V2 if supported */
3343-
if (hdev->commands[41] & 0x20)
3344-
return __hci_cmd_sync_status(hdev,
3345-
HCI_OP_LE_READ_BUFFER_SIZE_V2,
3346-
0, NULL, HCI_CMD_TIMEOUT);
3347-
33483342
return __hci_cmd_sync_status(hdev, HCI_OP_READ_BUFFER_SIZE,
33493343
0, NULL, HCI_CMD_TIMEOUT);
33503344
}
@@ -3558,6 +3552,12 @@ static const struct hci_init_stage hci_init2[] = {
35583552
/* Read LE Buffer Size */
35593553
static int hci_le_read_buffer_size_sync(struct hci_dev *hdev)
35603554
{
3555+
/* Use Read LE Buffer Size V2 if supported */
3556+
if (hdev->commands[41] & 0x20)
3557+
return __hci_cmd_sync_status(hdev,
3558+
HCI_OP_LE_READ_BUFFER_SIZE_V2,
3559+
0, NULL, HCI_CMD_TIMEOUT);
3560+
35613561
return __hci_cmd_sync_status(hdev, HCI_OP_LE_READ_BUFFER_SIZE,
35623562
0, NULL, HCI_CMD_TIMEOUT);
35633563
}

0 commit comments

Comments
 (0)