Bluetooth: ISO: Fix ISO MTU when CONFIG_BT_BREDR=y

If CONFIG_BT_BREDR=y and bt_dev.le.acl_mtu == 0, then we
would report the bt_dev.br.mtu for ISO channels.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-12-16 18:40:15 +01:00 committed by Carles Cufí
commit a96f8ba9ba

View file

@ -507,7 +507,8 @@ static int send_iso(struct bt_conn *conn, struct net_buf *buf, uint8_t flags)
static inline uint16_t conn_mtu(struct bt_conn *conn)
{
#if defined(CONFIG_BT_BREDR)
if (conn->type == BT_CONN_TYPE_BR || !bt_dev.le.acl_mtu) {
if (conn->type == BT_CONN_TYPE_BR ||
(conn->type != BT_CONN_TYPE_ISO && !bt_dev.le.acl_mtu)) {
return bt_dev.br.mtu;
}
#endif /* CONFIG_BT_BREDR */