diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-10-05 09:56:57 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-07 18:22:23 -0400 |
commit | dcc042d56f66fb2a9db6a2683e6aa4815782da8b (patch) | |
tree | cdef1fe3a7a57c8f698bbc162275f407c25b2b28 /net | |
parent | a0c234fe8972aa6a5afe2db6c27a3f5d5fbd88e7 (diff) |
Bluetooth: AMP: Use block_mtu for AMP controller
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b4e707bfc08d..d605bbfddec1 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) | |||
1390 | 1390 | ||
1391 | BT_DBG("hcon %p conn %p hchan %p", hcon, conn, hchan); | 1391 | BT_DBG("hcon %p conn %p hchan %p", hcon, conn, hchan); |
1392 | 1392 | ||
1393 | if (hcon->hdev->le_mtu && hcon->type == LE_LINK) | 1393 | switch (hcon->type) { |
1394 | conn->mtu = hcon->hdev->le_mtu; | 1394 | case AMP_LINK: |
1395 | else | 1395 | conn->mtu = hcon->hdev->block_mtu; |
1396 | break; | ||
1397 | |||
1398 | case LE_LINK: | ||
1399 | if (hcon->hdev->le_mtu) { | ||
1400 | conn->mtu = hcon->hdev->le_mtu; | ||
1401 | break; | ||
1402 | } | ||
1403 | /* fall through */ | ||
1404 | |||
1405 | default: | ||
1396 | conn->mtu = hcon->hdev->acl_mtu; | 1406 | conn->mtu = hcon->hdev->acl_mtu; |
1407 | break; | ||
1408 | } | ||
1397 | 1409 | ||
1398 | conn->src = &hcon->hdev->bdaddr; | 1410 | conn->src = &hcon->hdev->bdaddr; |
1399 | conn->dst = &hcon->dst; | 1411 | conn->dst = &hcon->dst; |