From: Andrei Emeltchenko Date: Fri, 5 Oct 2012 13:56:57 +0000 (+0300) Subject: Bluetooth: AMP: Use block_mtu for AMP controller X-Git-Tag: v3.8-rc1~139^2~17^2~353^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcc042d56f66fb2a9db6a2683e6aa4815782da8b;p=platform%2Fupstream%2Fkernel-adaptation-pc.git Bluetooth: AMP: Use block_mtu for AMP controller Signed-off-by: Andrei Emeltchenko Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b4e707b..d605bbf 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -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) - conn->mtu = hcon->hdev->le_mtu; - else + 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; + break; + } + /* fall through */ + + default: conn->mtu = hcon->hdev->acl_mtu; + break; + } conn->src = &hcon->hdev->bdaddr; conn->dst = &hcon->dst;