From a96f8ba9ba2876bb116550ce2975a2be5ffdd3a4 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 16 Dec 2022 18:40:15 +0100 Subject: [PATCH] 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 --- subsys/bluetooth/host/conn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 54e8e2cca1c..17ffb73b018 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -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 */