Bluetooth: BR/EDR: Use correct ACL Tx MTU and semaphore

Selects right ACL Tx MTU and semaphor based on connection link type
and indirectly controller buffers capabilities.

Change-Id: I1df1ba81e6b09d9d5bdcd34a93d9a3d255133143
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2015-11-23 12:29:39 +01:00 committed by Anas Nashif
commit c4a503b6b4
2 changed files with 16 additions and 2 deletions

View file

@ -383,8 +383,15 @@ fail:
static inline uint16_t conn_mtu(struct bt_conn *conn)
{
ARG_UNUSED(conn);
#if defined(CONFIG_BLUETOOTH_BREDR)
if (conn->type == BT_CONN_TYPE_BREDR || !bt_dev.le.mtu) {
return bt_dev.br.mtu;
} else {
return bt_dev.le.mtu;
}
#else
return bt_dev.le.mtu;
#endif
}
static struct net_buf *create_frag(struct bt_conn *conn, struct net_buf *buf)