From ba0bb89a70dabc0da5fe3478da5f2a425dc7ea5a Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 16 Dec 2022 18:37:15 +0100 Subject: [PATCH] Bluetooth: ISO: Fix `conn_mtu` for BT_CONN_TYPE_ISO If the bt_dev.le.iso_mtu was 0, then we would report bt_dev.le.acl_mtu if CONFIG_BT_CONN=y (which is often true when CONFIG_BT_ISO=y). Thus if the ISO MTU is 0, we would often return a non-0 value. Signed-off-by: Emil Gydesen --- subsys/bluetooth/host/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 33d3acd706e..54e8e2cca1c 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -512,7 +512,7 @@ static inline uint16_t conn_mtu(struct bt_conn *conn) } #endif /* CONFIG_BT_BREDR */ #if defined(CONFIG_BT_ISO) - if (conn->type == BT_CONN_TYPE_ISO && bt_dev.le.iso_mtu) { + if (conn->type == BT_CONN_TYPE_ISO) { return bt_dev.le.iso_mtu; } #endif /* CONFIG_BT_ISO */