Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcc042d5 authored by Andrei Emeltchenko's avatar Andrei Emeltchenko Committed by Gustavo Padovan
Browse files

Bluetooth: AMP: Use block_mtu for AMP controller

parent a0c234fe
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -1390,10 +1390,22 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status)

	BT_DBG("hcon %p conn %p hchan %p", hcon, conn, hchan);

	if (hcon->hdev->le_mtu && hcon->type == LE_LINK)
	switch (hcon->type) {
	case AMP_LINK:
		conn->mtu = hcon->hdev->block_mtu;
		break;

	case LE_LINK:
		if (hcon->hdev->le_mtu) {
			conn->mtu = hcon->hdev->le_mtu;
	else
			break;
		}
		/* fall through */

	default:
		conn->mtu = hcon->hdev->acl_mtu;
		break;
	}

	conn->src = &hcon->hdev->bdaddr;
	conn->dst = &hcon->dst;